Skip to content

Commit 0ffe84a

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/checkout-5
2 parents e747b6a + ceec7e5 commit 0ffe84a

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ lint: ## Run pep8, black, mypy linters.
3535
$(ENV_PREFIX)flake8 readme_ready/
3636
$(ENV_PREFIX)black -l 79 --check readme_ready/
3737
$(ENV_PREFIX)black -l 79 --check tests/
38-
$(ENV_PREFIX)mypy --ignore-missing-imports --disable-error-code=arg-type readme_ready/
38+
$(ENV_PREFIX)mypy --ignore-missing-imports --disable-error-code=arg-type --disable-error-code=assignment readme_ready/
3939

4040
.PHONY: test
4141
test: lint ## Run tests and generate coverage report.

readme_ready/utils/llm_utils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,17 @@ def get_llama_chat_model(model_name: str, streaming=False, model_kwargs=None):
129129
)
130130

131131

132+
def get_ollama_chat_model(model_name: str, streaming=False, model_kwargs=None):
133+
"""Get Ollama Chat Model"""
134+
from langchain_ollama import ChatOllama
135+
136+
return ChatOllama(
137+
model=model_name,
138+
temperature=model_kwargs["temperature"],
139+
num_ctx=model_kwargs["max_length"],
140+
disable_streaming=not streaming,
141+
)
142+
132143
def get_openai_chat_model(
133144
model: str, temperature=None, streaming=None, model_kwargs=None
134145
) -> ChatOpenAI:

0 commit comments

Comments
 (0)