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

chat_completion function don't work properly #123

Closed
o3o1 opened this issue May 23, 2024 · 4 comments · Fixed by #125, #202 or #208
Closed

chat_completion function don't work properly #123

o3o1 opened this issue May 23, 2024 · 4 comments · Fixed by #125, #202 or #208
Assignees
Labels
bug Something isn't working

Comments

@o3o1
Copy link

o3o1 commented May 23, 2024

I can create an assistant and chat with it properly, so the model does work well, but can't run the chat_completion function using the example code in the doc:
chat_completion_result = taskingai.inference.chat_completion( model_id=model_id, messages=[ {"role": "system", "content": "You are a health advisor providing nutritional advice. You should always reply with a professional, kind, and patient tone."}, {"role": "user", "content": "How much suger can a woman take in a day?"}, ] )
Keep getting this error in the picture.
微信图片_20240523165900

@jameszyao jameszyao self-assigned this May 23, 2024
@jameszyao
Copy link
Contributor

jameszyao commented May 23, 2024

@o3o1 Thanks for your feedback. If the chat completion API works in the playgrorund, It seems to be a client issue. we'll look into it and and provide a quick fix

@o3o1
Copy link
Author

o3o1 commented May 23, 2024

@jameszyao The UI won't response when confirm model selection in the 'Playground-Chat Completion' interface, but it works fine if you start playground via actions in the 'Models' interface. The function issue seems to occur after I ran a gradio demo, not sure if it's relevant.

@jameszyao
Copy link
Contributor

@o3o1 we have released a new client SDK version v0.2.5. Please upgrade your TaskingAI client version using pip and see if the chat completion works now :-)

@jameszyao jameszyao added the bug Something isn't working label May 29, 2024
@o3o1
Copy link
Author

o3o1 commented May 29, 2024

@jameszyao works fine now, much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment