-
Notifications
You must be signed in to change notification settings - Fork 737
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
Support for Ollama #616
Comments
Could you please capture the request through F12 Network in the Ollama WebUI, and provide the relevant request headers and body |
It would be nice to use ollama ! Maybe it works with the support of ollama openai api ? Example of settings ? |
After consulting the documentation of ollama, I found that ollama provides APIs compatible with OpenAI API. And for the 403 error, it is actually caused by cross-origin requests. According to https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-allow-additional-web-origins-to-access-ollama, you can set environment variable |
thanks for the tip, filling the model name eg: "gemma:2b" is a requirement for ollama to works, along with: |
Something to note. |
Is your feature request related to a problem? Please describe.
![image](https://private-user-images.githubusercontent.com/13810199/299758867-f516a1bb-c0c6-4ef3-a076-c91f054e35b3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NTcwOTAsIm5iZiI6MTcyNTU1Njc5MCwicGF0aCI6Ii8xMzgxMDE5OS8yOTk3NTg4NjctZjUxNmExYmItYzBjNi00ZWYzLWEwNzYtYzkxZjA1NGUzNWIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA1VDE3MTk1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY3NDg1M2VlNTJlMzU0NmJkZmMzNjEwMWJmYTYyODliMGM2MTg3NzczMjE5OWNmMWEwYjI4OGQ3Nzg2MTVkZDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.aKfUJx56eC3rmH6WYCWre7Ui4nLcLWMzBeHTGZm9QNU)
新功能是否与解决某个问题相关, 请描述
When trying to have the extension target my local Mistral handled by Ollama, it fails (HTTP 403).
The settings:
![image](https://private-user-images.githubusercontent.com/13810199/299757350-7d4b6dff-f07b-44a0-9da7-d9ca7d4fdab2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NTcwOTAsIm5iZiI6MTcyNTU1Njc5MCwicGF0aCI6Ii8xMzgxMDE5OS8yOTk3NTczNTAtN2Q0YjZkZmYtZjA3Yi00NGEwLTlkYTctZDljYTdkNGZkYWIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA1VDE3MTk1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5NmIzOWJmYTZhOWQ1NTAxYTg4NjdmMDEyMWFjNGMwMzZiMDVjNDk3YTliNDBhYTUzMjhmZjkwMTFjMzZmOWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.i_cGBDLVt8oXXRqXtOiamQncMGth0v7vfEWpzwE6yz4)
I haven't digged into the code yet, but maybe it's because it uses a different API.
Can see here that Ollama WebUI works as expected
![image](https://private-user-images.githubusercontent.com/13810199/299758287-77341af0-9629-477e-894d-a17196f97435.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NTcwOTAsIm5iZiI6MTcyNTU1Njc5MCwicGF0aCI6Ii8xMzgxMDE5OS8yOTk3NTgyODctNzczNDFhZjAtOTYyOS00NzdlLTg5NGQtYTE3MTk2Zjk3NDM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA1VDE3MTk1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlN2Y1MTNlMmYwOTM1NDRkMmEzYWI5YmFmNjgyMWI1MGYyN2QyYWYzZjFhNmJmNDNmOTM4ZDBkNDUyZmU4NTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ey73CZWpI2uspeVLH1G1vnLr5hlvOsp_oW_cwAzxobI)
and that Ollama is running
![image](https://private-user-images.githubusercontent.com/13810199/299758471-02702336-ca22-4e8b-adfb-c99248c39241.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NTcwOTAsIm5iZiI6MTcyNTU1Njc5MCwicGF0aCI6Ii8xMzgxMDE5OS8yOTk3NTg0NzEtMDI3MDIzMzYtY2EyMi00ZThiLWFkZmItYzk5MjQ4YzM5MjQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA1VDE3MTk1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyYmI1NTIxNjEyNjU2N2E1MWQ0YTgzZjM4NDA3YWRjNDQ0ZmIxMmMxNjNmNmNmZGY3ZjcwYTk0NzI4NjE3MWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pPRn_6w445g6v3fadFHU3hUDTDCosgH041NneUqswIA)
Describe the solution you'd like
你期望的新功能实现方案
ChatGPTBox to work with Ollama.
Additional context
其他
Yes, see above :).
The text was updated successfully, but these errors were encountered: