mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(main.py): fix calling openai gpt-3.5-turbo-instruct via /completions
Fixes https://github.com/BerriAI/litellm/issues/749
This commit is contained in:
parent
d1622f6c0c
commit
5945da4a66
5 changed files with 41 additions and 14 deletions
|
@ -1,14 +1,18 @@
|
|||
import sys, os
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
import os, io
|
||||
import io
|
||||
import os
|
||||
|
||||
sys.path.insert(
|
||||
0, os.path.abspath("../..")
|
||||
) # Adds the parent directory to the system path
|
||||
import pytest
|
||||
|
||||
import litellm
|
||||
|
||||
|
||||
|
@ -21,6 +25,12 @@ def test_get_llm_provider():
|
|||
# test_get_llm_provider()
|
||||
|
||||
|
||||
def test_get_llm_provider_gpt_instruct():
|
||||
_, response, _, _ = litellm.get_llm_provider(model="gpt-3.5-turbo-instruct-0914")
|
||||
|
||||
assert response == "text-completion-openai"
|
||||
|
||||
|
||||
def test_get_llm_provider_mistral_custom_api_base():
|
||||
model, custom_llm_provider, dynamic_api_key, api_base = litellm.get_llm_provider(
|
||||
model="mistral/mistral-large-fr",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue