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

Changing the response message of the model #7

Open
othmanelhoufi opened this issue Apr 8, 2023 · 1 comment
Open

Changing the response message of the model #7

othmanelhoufi opened this issue Apr 8, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@othmanelhoufi
Copy link

othmanelhoufi commented Apr 8, 2023

Hello,

Thanks for this great tool, I am actually trying to adapt your code for Azure OpenAI API, and I am using the chat completion models, here is the API Response :

{
 'id': 'chatcmpl-6p9XYPYSTTRi0xEviKjjilqrWU2Ve',
 'object': 'chat.completion',
 'created': 1677649420,
 'model': 'gpt-3.5-turbo',
 'usage': {'prompt_tokens': 56, 'completion_tokens': 31, 'total_tokens': 87},
 'choices': [
   {
    'message': {
      'role': 'assistant',
      'content': 'The 2020 World Series was played in Arlington, Texas at the Globe Life Field, which was the new home stadium for the Texas Rangers.'},
    'finish_reason': 'stop',
    'index': 0
   }
  ]
}

Can you please tell me how to modify the message object you wrote (id, role, content) so that it takes into account the new reponse.

Thanks,

@Nashex
Copy link
Owner

Nashex commented Apr 8, 2023

I can certainly take a look at that!

@Nashex Nashex added the enhancement New feature or request label Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants