Skip to content
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

Add framework to setup integration test #616

Merged
merged 6 commits into from
Jan 31, 2025
Merged

Conversation

varungup90
Copy link
Collaborator

No description provided.

@varungup90 varungup90 changed the title WIP: Add framework to setup integration test Add framework to setup integration test Jan 30, 2025
Copy link
Collaborator

@Jeffwan Jeffwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest part looks good to me

@@ -278,6 +278,7 @@ def completion():
return jsonify(err), 500


@app.route('/chat/completions', methods=['POST'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the endpoint for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on using openai-go official openai go library uses /chat/completion and v1/chat/completion is used by batch api.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this is kind of confusing. golang sdk hit different endpoints?

  1. we are not using batch in testing scenarios
  2. /chat/completion this is openai not compatible

is there a detail problem on the golang sdk usage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems they assume v1 as part of the UrlBase. final url is still v1/chat/completions? openai/openai-go#105

If it does need /chat/completions, let document this part in the file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a middleware router to append /v1.

@Jeffwan Jeffwan merged commit 2802257 into main Jan 31, 2025
7 checks passed
@Jeffwan Jeffwan deleted the add-integ-test-framework branch January 31, 2025 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants