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

Use Together Python library for Snowflake Arctic Instruct #2599

Merged
merged 5 commits into from
May 6, 2024

Conversation

yifanmai
Copy link
Collaborator

@yifanmai yifanmai commented May 3, 2024

The current client sends raw HTTP API requests. For some reason, the API is different for Snowflake Arctic Instruct, which results in the following error:

Together request failed with 500: {"error":{"message":"axios status: 400: [object Object]","type":"server_error","param":null,"code":null}}

The new client uses the official Together Python library, which does not result in this error.

@yifanmai yifanmai requested review from percyliang and farzaank May 3, 2024 01:49
messages = request.messages
else:
messages = [{"role": "user", "content": request.prompt}]
return {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have to convert the dict into a TogetherRawChatRequest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, the dict automatically counts as a TogetherRawChatRequest without any explicit conversion needed (PEP-589)

@yifanmai yifanmai force-pushed the yifanmai/fix-together-chat branch from 4bf5817 to 2703ed8 Compare May 3, 2024 23:17
@yifanmai yifanmai changed the title Ues Together Python library for Snowflake Arctic Instruct Use Together Python library for Snowflake Arctic Instruct May 4, 2024
@yifanmai yifanmai force-pushed the yifanmai/fix-together-chat branch from 2703ed8 to a61c618 Compare May 6, 2024 22:54
@yifanmai yifanmai merged commit c21cf3d into main May 6, 2024
6 checks passed
@yifanmai yifanmai deleted the yifanmai/fix-together-chat branch May 6, 2024 23:49
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