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

Is it possible to use ollama embedding model while using OpenAI model for agents? #351

Closed
SingTeng opened this issue May 21, 2024 · 2 comments

Comments

@SingTeng
Copy link

Is your feature request related to a problem? Please describe.
Is it possible to use Ollama embedding model for plugin selection while using OpenAI model for agents.
See my config file blow:
{
"llm.api_base": "https://xxx.openai.azure.com/",
"llm.api_key": "xxx",
"llm.api_type": "azure",
"llm.api_version": "2023-07-01-preview",
"llm.model": "gpt-4",
"llm.response_format": null,
"llm.embedding_api_type": "ollama",
"llm.embedding_model": "nomic-embed-text:latest",
"code_generator.enable_auto_plugin_selection": true,
"code_generator.auto_plugin_selection_topk": 2,
"execution_service.kernel_mode": "local",
"planner.prompt_compression": true,
"code_generator.prompt_compression": true
}

I thought I would need to input ollama api into the config as well? I can't seem to find the info.

Describe the solution you'd like
Be able to use Ollama model for plugin auto selection, at the same time using OpenAI models for agents.

@liqul
Copy link
Contributor

liqul commented May 21, 2024

I didn't try myself, but I think the embedding model is configured seperately with the model for the agent roles, and so you should be able to do what you want.

You can take a look at this file taskweaver/llm/ollama.py and the config class OllamaServiceConfig. I think you need to configure at least the following one, given that you have already configured the others in your example above:

llm.ollama.api_base = xxxx

Please let me know if this can work.

@SingTeng
Copy link
Author

Yes, it works after adding
llm.ollama.api_base = xxxx

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

2 participants