Skip to content

Commit

Permalink
Update app/llm/external/ollama.py
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
kaancayli and coderabbitai[bot] authored Nov 11, 2024
1 parent df9eca0 commit 6d3c5ef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/llm/external/ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,21 @@ def embed(self, text: str) -> list[float]:
)
return list(response)

"""Bind tools to the language model for function calling capabilities.
Note: Tool binding is currently not supported in Ollama models. This feature
is only available for OpenAI models.
Args:
tools: A sequence of tools to bind to the model.
Returns:
A runnable that can process inputs with the bound tools.
Raises:
NotImplementedError: Always raised as Ollama does not support tool binding.
"""
# TODO: Implement tool binding support for Ollama models
def bind_tools(
self,
tools: Sequence[
Expand Down

0 comments on commit 6d3c5ef

Please sign in to comment.