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

Support for tools/function calling. #115

Merged
merged 15 commits into from
Sep 24, 2024
Merged

Support for tools/function calling. #115

merged 15 commits into from
Sep 24, 2024

Conversation

ggozad
Copy link
Owner

@ggozad ggozad commented Sep 12, 2024

Tools

Tools are special "functions" that can provide external information to the LLM model that it does not otherwise have access to.

The following tools are currently supported:

  • date_time - provides the current date and time in ISO format.
  • current_location - provides the current location of the user (longitude, latitude, city, region, country). Uses ipinfo.io to determine the location.
  • current_weather - provides the current weather in the user's location. Uses OpenWeatherMap to determine the weather.
  • shell - allows you to run shell commands and use the output as input to the model. Obviously this can be dangerous, so use with caution.

Note that tools integration is experimental and may change in the future. I particularly welcome contributions for new tools, bear in mind that any additional requirements in terms of dependencies or paid-for API usage should be kept to a minimum.

@ggozad ggozad marked this pull request as draft September 12, 2024 10:23
@ggozad
Copy link
Owner Author

ggozad commented Sep 12, 2024

This is more or less ready to go from our side.
Due to a bug in Ollama tools do not work properly when the response is streamed as we do in oterm. Once this is fixed we can proceed to release tool support.
ollama/ollama-python#279

@ggozad ggozad added enhancement New feature or request help wanted Extra attention is needed labels Sep 12, 2024
@ggozad ggozad marked this pull request as ready for review September 24, 2024 16:07
@ggozad ggozad changed the title Enable authoring and use of external tools for models that support it. Support for tools/function calling. Sep 24, 2024
@ggozad ggozad merged commit f2705a3 into main Sep 24, 2024
@ggozad ggozad deleted the feat/tools branch September 24, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant