High level chat interface & Ruby DSL for adding callable functions #375
ErikDeBruijn
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
@alexrudall did you see my post? Please just reply with a few thoughts, so I can start contributing something in one way or another. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly, let me say thanks for this gem @alexrudall !
On top op this gem I built the following for an intelligent agent:
TL;DR: I wanted to be able to do this:
I am wondering whether some functionality could/should be integrated in the library or that a higher-level gem of mine should simply use this library. An interesting consideration is the fact that there is more than one LLM, and just like Faraday, it could be nice if there were Adapters that allow you to switch backends. I think registration of functions and calling them on the "ruby" side might be responsibilities of this library.
I can create a pull request for this, that will enable you to see how it's organized, but before I do this, I'd love to get your take on this.
1. High level interface for chat
Basically it enables this:
2. Function registration and calling
The function used above is declared as follows:
For this the agent advertises the available functions, has a
@messages
stack, calls the functions and returns the result and manages the conversation further.I'm very interested in your thoughts!
Beta Was this translation helpful? Give feedback.
All reactions