Support For Other OpenAI Models

 

Some models, like "gpt-3.5-turbo-1106" are not supported natively by AI Engine, but you can use a filter to add support for any openai models.

add_filter('mwai_openai_models', function ($models) {
  $gpt_1106 = [
    "model" => "gpt-3.5-turbo-1106",
    "name" => "gpt-3.5-turbo-1106",
    "family" => "gpt3.5",
    "price" => [
      "in" => 0.0010,
      "out" => 0.0020,
    ],
    "type" => "token",
    "unit" => 1 / 1000,
    "maxTokens" => 16385,
    "mode" => "chat",
    "finetune" => false,
    "tags" => ['core', 'chat']
  ];

  $models[] = $gpt_1106;
  return $models;
});
Did this answer your question?
😞
😐
🤩