Skip to content
Discussion options

You must be logged in to vote

A couple of things are worth checking before assuming the source generator isn't working.

  1. Verify the generated tool metadata

The [OllamaTool] attribute relies on the source generator to produce the tool schema. If the generator isn't running (or the generated files aren't being included), you'll end up with an empty tools payload such as:

"tools":[{}]

Try inspecting the generated files under the project's generated sources (or enable emitting compiler-generated files) to confirm that CollectionTools actually has a generated tool definition.

  1. Check how the tools collection is being passed

You're currently doing:

var tools = new List<object> { new CollectionTools() };
await foreach (var m…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by gordon-vart
Comment options

You must be logged in to vote
1 reply
@Ganesh-403
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants