-
-
Couldn't load subscription status.
- Fork 295
Description
Scope check
- This is core LLM communication (not application logic)
- This benefits most users (not just my use case)
- This can't be solved in application code with current RubyLLM
- I read the Contributing Guide
Due diligence
- I searched existing issues
- I checked the documentation
What problem does this solve?
This would allow you to add parameters on initialization, would be useful for similar tools with different parameters or for customizable tools by users/customers of your app.
Proposed solution
Should be as simple as doing this:
Lines 58 to 64 in 96d06c4
| def description | |
| self.class.description | |
| end | |
| def parameters | |
| self.class.parameters | |
| end |
def description
@description || self.class.description
end
def parameters
@parameters || self.class.parameters
end Then if you add @parameters or @description on initialization, it will use the instance variables instead
This would keep the current way of creating the classes but allows for better custom parameters/descriptions without cluttering the codebase.
Another idea is to join the class variable with the instance variable.
Why this belongs in RubyLLM
Doing this in application code can cause more uncertainty and instability because a change to the core RubyLLM gem could break custom implementations. Officially supporting this method ensures its stability and long-term compatibility.