-
Notifications
You must be signed in to change notification settings - Fork 278
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
Comments
@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 |
@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. |
@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 works fine now, much appreciated :) |
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:
![微信图片_20240523165900](https://private-user-images.githubusercontent.com/71247215/333116096-eed1c9b5-a35b-4cb7-9f46-b1a415b4118f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0OTU0MjcsIm5iZiI6MTcyMTQ5NTEyNywicGF0aCI6Ii83MTI0NzIxNS8zMzMxMTYwOTYtZWVkMWM5YjUtYTM1Yi00Y2I3LTlmNDYtYjFhNDE1YjQxMThmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDE3MDUyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM1Y2Q1MWIxZDU5N2QxNjIwNWFlMDhmMTQ4ODM3Njg0NzJjYTYzOTlhYjIxOWRiOTYzYzg5ZDVkMDM5ODkzODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.C-7yQfWD86_xqDiDLC8iQm_LVS_Ae8YP8rjX5IwYSfU)
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.
The text was updated successfully, but these errors were encountered: