Closed Ivanw closed 1 year ago
@Ivanw can you share a code snippet we can use for repro?
@krrishdholakia I just use the exact same as the sample code:
import openai
api_base = f"http://0.0.0.0:8000" # base url for server
openai.api_base = api_base
openai.api_key = "temp-key"
print(openai.api_base)
print(f'LiteLLM: response from proxy with streaming')
response = openai.ChatCompletion.create(
model="ollama/llama2",
messages = [
{
"role": "user",
"content": "this is a test request, acknowledge that you got it"
}
],
stream=True
)
for chunk in response:
print(f'LiteLLM: streaming response from proxy {chunk}')
The error would imply there's some issue on the server. Does it work when you make a curl request? @Ivanw
bump @Ivanw
Hi @Ivanw was this issue resolved ?
I'd love to hop on a call and ensure this gets resolved for you sharing my cal for your convenience: https://calendly.com/ishaan-berri/30min?month=2023-11
same error: curl --location 'http://0.0.0.0:8000/v1/chat/completions' --header 'Content-Type: application/json' --data ' { "model": "ollama/gemma:7b-instruct-q5_K_M", "messages": [ { "role": "user", "content": "what llm are you" } ], } '
config:
model change to gpt-3.5-turbo , same error
What happened?
I followed this https://docs.litellm.ai/docs/providers/ollama#making-a-request-to-this-server write a test code(just copy them), after executing I get
404 page not found
.In docker container, I can execute successful,
In my browser access
http://localhost:8000
or usecurl http://localhost:8000
, response successful withOllama is running
.Relevant log output
log of docker image ollama:
Twitter / LinkedIn details
No response