We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please, support api keys for ollama.
Ollama is not compatible with openai API, e.g. /v1/models. It is possible to hide ollama instance behind pre-determined api keys.
/v1/models
I believe this is the part where this feature would be implemented: https://github.com/davidmigloz/langchain_dart/blob/main/packages/langchain_ollama/lib/src/chat_models/chat_ollama.dart#L148. The api key is passed as Bearer token in request header.
The text was updated successfully, but these errors were encountered:
Hello @theoden8,
You can provide any custom header using theheaders field:
headers
final chat = ChatOllama( baseUrl: 'https://your-base-url.com/api', headers: { 'api-key': 'YOUR_API_KEY' }, defaultOptions: ChatOllamaOptions( model: 'llama3', temperature: 0, ), );
Sorry, something went wrong.
No branches or pull requests
Feature request
Please, support api keys for ollama.
Motivation
Ollama is not compatible with openai API, e.g.
/v1/models
. It is possible to hide ollama instance behind pre-determined api keys.Your contribution
I believe this is the part where this feature would be implemented: https://github.com/davidmigloz/langchain_dart/blob/main/packages/langchain_ollama/lib/src/chat_models/chat_ollama.dart#L148. The api key is passed as Bearer token in request header.
The text was updated successfully, but these errors were encountered: