ChatCompletionMessage.content default value should be '' #25090
Closed
loveyoufooyou
announced in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Change the default value of the ChatCompletionMessage class to ''
Motivation
I have the following requirement:
After the program returns ChatCompletionMessage instance, I need to make instance the message of the chat program. You will get an error:
BadRequestError: Error code: 400 - {'error': {'message': "Invalid value for 'content': expected a string, got null.
.This causes me to have to determine whether content is None after I get
response_message
.So I want to return a ChatCompletionMessage instance with a content attribute of ''.
Proposal (If applicable)
Change the default value of the ChatCompletionMessage class
Beta Was this translation helpful? Give feedback.
All reactions