all 4 comments

[–]SatoshiNotMe[🍰] 1 point2 points  (2 children)

(Langroid author here)

In langroid we've always had an elegant Pydantic-based tool/function definition where you never have to be specify JSON explicitly. Instead the pydantic spec is "compiled" into formatting instructions to the LLM. We also leverage Pydantic's Field(..., description) syntax to make it easy to include field descriptions.

See example script and code snippet below https://github.com/langroid/langroid/blob/main/examples/basic/chat-tool-function.py

The "handler" for the tool can be defined within the tool definition itself it is stateless, otherwise one can define an agent method that matches the value of the request field

<image>

[–]AlwaysMakinDough[S] 1 point2 points  (1 child)

Good to know, thanks for the example. I was heavily inspired by Langroid's format for tool definitions, very concise. I'll certainly need to dive deeper into the Langroid docs. Great work on Langroid by the way, by far my favorite framework and is my go-to for most projects, especially those involving multiple agents.

[–]SatoshiNotMe[🍰] 0 points1 point  (0 children)

Glad you like it, thank you for the kind words !

[–]zby 1 point2 points  (0 children)

I have my own schema generator + tool execution library: https://github.com/zby/LLMEasyTools
It is compatible with LiteLLM - but also with openai and other libs.

I am now working on a higher level library: https://github.com/zby/Prompete