tryAGI / Ollama

Ollama SDK for .NET
https://tryagi.github.io/Ollama/
MIT License
29 stars 1 forks source link

llama3.1 function call #13

Closed icetech233 closed 1 month ago

icetech233 commented 1 month ago

What would you like to be added:

Why is this needed:

Anything else we need to know?

HavenDV commented 1 month ago

I added tools and Source Generator support for this, you can take a look at it here: https://github.com/tryAGI/Ollama/blob/main/src/tests/Ollama.IntegrationTests/Tests.Integration.cs#L180 https://github.com/tryAGI/Ollama/blob/main/src/tests/Ollama.IntegrationTests/WeatherFunctions.cs You can also define tools manually if you want.

But maybe some testing is still needed here

HavenDV commented 1 month ago

I also added support for automatically calling tools for client.Chat(), you can see an example in the README.