-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: function_call can be a string or an object #374
Conversation
Codecov Report
@@ Coverage Diff @@
## master #374 +/- ##
==========================================
+ Coverage 95.22% 96.08% +0.85%
==========================================
Files 17 17
Lines 670 689 +19
==========================================
+ Hits 638 662 +24
+ Misses 22 19 -3
+ Partials 10 8 -2
|
Oops, it's a specification that the arguments are returned in stream!
|
} | ||
if v, isMap := value.(map[string]string); isMap { | ||
return v["name"] != "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a structure as a usable type?
For example:
type Foo struct {
Name string `json:"name"`
}
Anything I can do to help push this PR forward? |
Sorry, I'm not available to push this forward, so closing. Please take #388 a look instead. |
According to the document,
function_call
parameter can a string literal: "none", "auto", or an object with a key "name".https://platform.openai.com/docs/api-reference/chat/create#chat/create-function_call
Also added
FunctionCall
toChatCompletionStreamChoiceDelta
.