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

fix: ollama model provider can not set 'num_ctx' etc. parameter #2442 #2444

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

itaa
Copy link
Contributor

@itaa itaa commented Feb 28, 2025

langchain-openai is not compatible with parameter Settings in ollama, such as num_ctx. Therefore, you need to create model instances using langchain-ollama

What this PR does / why we need it?

fix: ollama model provider can not set 'num_ctx' etc. parameter #2442

Summary of your change

  1. pyproject.toml add langchain-ollama = "0.1.3"
  2. apps/setting/models_provider/impl/ollama_model_provider/model/llm.py
    using langchain_ollama.chat_models ChatOllama and fit langchain-ollama parameter

Please indicate you've done the following:

  • [✅] Made sure tests are passing and test coverage is added if needed.
  • [✅] Made sure commit message follow the rule of Conventional Commits specification.
  • [✅] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

…l-dev#2442

langchain-openai is not compatible with parameter Settings in ollama, such as num_ctx. Therefore, you need to create model instances using langchain-ollama

(cherry picked from commit 42ae7b4)
Copy link

f2c-ci-robot bot commented Feb 28, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

f2c-ci-robot bot commented Feb 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shaohuzhang1 shaohuzhang1 merged commit ed8f8f8 into 1Panel-dev:main Feb 28, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants