Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection refused! #635

Open
hugo921 opened this issue Feb 18, 2024 · 3 comments
Open

connection refused! #635

hugo921 opened this issue Feb 18, 2024 · 3 comments
Assignees

Comments

@hugo921
Copy link

hugo921 commented Feb 18, 2024

          > Found out that the 'OPENAI_API_TYPE' value 'llama2' does not work. I also noticed that the `llm = get_llm()` is used 3 times but not used in the code. A llm is used via `chat = get_chat_model()`.

TLDR. To get OpenCopilot working with locally run LLM via Ollama set these variables in the .env file:

OPENAI_API_KEY=unused
CHAT_MODEL=openchat
EMBEDDING_PROVIDER=openchat
LOCAL_IP=http://host.docker.internal
VECTOR_SIZE=4096

i did according your config, but i got the below reply from bot copilot
"HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/generate/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f59863faaf0>: Failed to establish a new connection: [Errno 111] Connection refused'))"
i dont know why this connection refused?

Originally posted by @hugo921 in #497 (comment)

@hugo921
Copy link
Author

hugo921 commented Feb 20, 2024

in the above test,I set LOCAL_IP variable as http://localhost ,so I set LOCAL_IP variable as http://host.docker.internal, and then i open the copilot ,chat with him;the progress is below.
"
bot's avatar
Hey Pal!
aaa
bot's avatar
HTTPConnectionPool(host='host.docker.internal', port=11434): Max retries exceeded with url: /api/generate/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8af4723670>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Bot
"
this time the bot copilot show "Name or service not known"

@codebanesr
Copy link
Collaborator

Are you sure openchat model exists ?
Try running this on your machine, if that works, then we might have to look into the code

ollama run openchat:latest

@hugo921
Copy link
Author

hugo921 commented Mar 15, 2024

image
openchat mode exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants