Closed domleboss97 closed 1 month ago
Thanks for pointing this out. This should be fixed in the latest release (v0.4.0).
Please let me know if the issue is fixed
Yes, thank you very much! Types are way cleaner with this release. One question - the tools_choice
type still excludes the required
value that the openai api supports. Have you all not implemented that on your end? Just confirming.
Groq API does not currently support required
. I believe this is being worked on.
We have added support for required
The definition of
CompletionCreateParams.ToolChoice
is the following interface:I inferred from this type, that to specify
tool_choice: "none"
, one would have to do the following.However this leads to the following 400 error:
When I instead specify the tool_choice directly (i.e.
tool_choice: "none"
), the request is successful and no tools are invoked, as expected. However, this causes a TS error that I need to ignore.It appears to me that the type definition of tool choice is incorrect. The toolchoice field of the
CompletionCreateParams
should be of typestring | ToolChoice
.