New Major Release 3.0.0 #120
Replies: 4 comments 8 replies
-
@sashirestela some useful functionality seems to be removed in 3.0.0 and I don't see a replacement. is that correct?
In addition, the revamping functions and tool code resulted in Does it make sense to restore these capabilities? The removed functions are not a big deal. We can just implement them ourselves (although if they are useful to us maybe they're useful to other users). But, not having getFunctionalClass() on |
Beta Was this translation helpful? Give feedback.
-
Yes. that's what I mean. But, those are really syntactic sugar. If you prefer to keep them out to keep the public API lean that's very valid.
You're right. It seems that by consolidating the ChatFunction and AssistantFunction into common we lost the ability to access the functionalClass of chat functions tools when their internal representation is stored as ToolFunctionDef. btw, why was there asymmetry originally in 2.x between ChatFunction and Assistant function? it would be helpful to have the ability to attach metadata to all tools/functions in the form of annotations on their class.
Yes. if you disagree that exposing the functional class is a useful feature then we will have to do that and maintain a separate mapping between tools and their class and make that mapping available to the code that requires it. Hopefully, that's a service that simple-openai can provide. |
Beta Was this translation helpful? Give feedback.
-
Are you replicating the behavior of the existing class Maybe you could call any validation logic in the beginning of your overridable |
Beta Was this translation helpful? Give feedback.
-
@sashirestela One more issue came up as a result of the refactoring. There is inconsistency in the use of Tool and AssistantTool.
While
AssistantTool extends Tool. Looking at the code it seems that all AssistantTool adds is the pre-defined tools CODE_INTERPRETER and FILE_SEARCH. Is it necessary to actually instantiate AssistantTool objects? The idea of the refactor to a common tool is that the Tool functionality is the same between chat and assistants. The fact that assistants have pre-defined tool doesn't require a new type of AssstantTool. Consider replacing all references to AssistantTool with just Tool. The AssistantTool class itself will still provide the CODE_INTEPRETER and FILE_SEARCH tools, but it will provide them as Tool instances. This will simplify the code, make it consistent and utilize just the common Tool for all use cases of chat and assistant APIs. I tried it locally and it and it works just fine (all the tests pass and all the demos). |
Beta Was this translation helpful? Give feedback.
-
What's new?
Assistants and Chat Completions. 🛠
Notes
See more details here
Beta Was this translation helpful? Give feedback.
All reactions