Skip to content

Commit

Permalink
chore: unpin llama-cpp-python (#1115)
Browse files Browse the repository at this point in the history
* unpin llamacpp

* progress

* fixes

* remove pin

* rm generation_kwargs

* rm print

* adjust
  • Loading branch information
anakin87 authored Sep 30, 2024
1 parent 60dbc8c commit 97094f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integrations/llama_cpp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = ["haystack-ai", "llama-cpp-python>=0.2.87,<0.3.0"]
dependencies = ["haystack-ai", "llama-cpp-python>=0.2.87"]

[project.urls]
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/llama_cpp#readme"
Expand Down
6 changes: 3 additions & 3 deletions integrations/llama_cpp/tests/test_chat_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def generator(self, model_path, capsys):
hf_tokenizer_path = "meetkai/functionary-small-v2.4-GGUF"
generator = LlamaCppChatGenerator(
model=model_path,
n_ctx=8192,
n_ctx=512,
n_batch=512,
model_kwargs={
"chat_format": "functionary-v2",
Expand Down Expand Up @@ -399,15 +399,15 @@ def test_function_call_and_execute(self, generator):
"type": "string",
"description": "The city and state, e.g. San Francisco, CA",
},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
},
"required": ["location"],
},
},
}
]

response = generator.run(messages=messages, generation_kwargs={"tools": tools})
tool_choice = {"type": "function", "function": {"name": "get_current_temperature"}}
response = generator.run(messages=messages, generation_kwargs={"tools": tools, "tool_choice": tool_choice})

available_functions = {
"get_current_temperature": self.get_current_temperature,
Expand Down

0 comments on commit 97094f7

Please sign in to comment.