-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feat implement Run APIs #560
Feat implement Run APIs #560
Conversation
Codecov Report
@@ Coverage Diff @@
## master #560 +/- ##
==========================================
+ Coverage 97.95% 98.22% +0.26%
==========================================
Files 21 22 +1
Lines 1026 1181 +155
==========================================
+ Hits 1005 1160 +155
Misses 15 15
Partials 6 6
|
Thank you for the PR! ❤️ We would need to add some integration tests for Assistants API at some point in the future |
run.go
Outdated
func (c *Client) SubmitToolOutputs( | ||
ctx context.Context, | ||
threadID string, | ||
runID string, | ||
request SubmitToolOutputsRequest) (response Run, err error) { | ||
urlSuffix := fmt.Sprintf("/threads/%s/runs/%s/submit_tool_outputs", threadID, runID) | ||
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request), | ||
withBetaAssistantV1()) |
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.
nit: could we please either use single-line or all-in multiple lines, so here it would be
func (c *Client) SubmitToolOutputs(
ctx context.Context,
threadID string,
runID string,
request SubmitToolOutputsRequest,
) (response Run, err error) {
urlSuffix := fmt.Sprintf("/threads/%s/runs/%s/submit_tool_outputs", threadID, runID)
req, err := c.newRequest(
ctx,
http.MethodPost,
c.fullURL(urlSuffix),
withBody(request),
withBetaAssistantV1(),
)
run.go
Outdated
limit *int, | ||
order *string, | ||
after *string, | ||
before *string, |
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.
I wonder if we should pack all these arguments into a struct?
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.
Yeah, I agree
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.
done
* chore: first commit * add apis * chore: add tests * feat add apis * chore: add api and tests * chore: add tests * fix * trigger build * fix * chore: formatting code * chore: add pagination type
Describe the change
This branch implements Run APIs
Issue: #533