forked from phoenix/litellm-mirror
test: commenting out local test
This commit is contained in:
parent
bb4f82066a
commit
3b70a6864f
1 changed files with 26 additions and 26 deletions
|
@ -1,35 +1,35 @@
|
||||||
##### THESE TESTS CAN ONLY RUN LOCALLY WITH THE OLLAMA SERVER RUNNING ######
|
# ##### THESE TESTS CAN ONLY RUN LOCALLY WITH THE OLLAMA SERVER RUNNING ######
|
||||||
# https://ollama.ai/
|
# # https://ollama.ai/
|
||||||
|
|
||||||
import sys, os
|
# import sys, os
|
||||||
import traceback
|
# import traceback
|
||||||
from dotenv import load_dotenv
|
# from dotenv import load_dotenv
|
||||||
load_dotenv()
|
# load_dotenv()
|
||||||
import os
|
# import os
|
||||||
sys.path.insert(0, os.path.abspath('../..')) # Adds the parent directory to the system path
|
# sys.path.insert(0, os.path.abspath('../..')) # Adds the parent directory to the system path
|
||||||
import pytest
|
# import pytest
|
||||||
import litellm
|
# import litellm
|
||||||
from litellm import embedding, completion
|
# from litellm import embedding, completion
|
||||||
import asyncio
|
# import asyncio
|
||||||
|
|
||||||
|
|
||||||
user_message = "respond in 20 words. who are you?"
|
# user_message = "respond in 20 words. who are you?"
|
||||||
messages = [{ "content": user_message,"role": "user"}]
|
# messages = [{ "content": user_message,"role": "user"}]
|
||||||
|
|
||||||
def test_completion_ollama():
|
# def test_completion_ollama():
|
||||||
try:
|
# try:
|
||||||
response = completion(
|
# response = completion(
|
||||||
model="ollama/llama2",
|
# model="ollama/llama2",
|
||||||
messages=messages,
|
# messages=messages,
|
||||||
max_tokens=200,
|
# max_tokens=200,
|
||||||
request_timeout = 10,
|
# request_timeout = 10,
|
||||||
|
|
||||||
)
|
# )
|
||||||
print(response)
|
# print(response)
|
||||||
except Exception as e:
|
# except Exception as e:
|
||||||
pytest.fail(f"Error occurred: {e}")
|
# pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
test_completion_ollama()
|
# test_completion_ollama()
|
||||||
|
|
||||||
# def test_completion_ollama_with_api_base():
|
# def test_completion_ollama_with_api_base():
|
||||||
# try:
|
# try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue