r"""When we only need the content of the first message. It is the default parser for chat completion.
(completion: ChatCompletion)
| 73 | |
| 74 | # completion parsing functions and you can combine them into one singple chat completion parser |
| 75 | def get_first_message_content(completion: ChatCompletion) -> str: |
| 76 | r"""When we only need the content of the first message. |
| 77 | It is the default parser for chat completion.""" |
| 78 | return completion.choices[0].message.content |
| 79 | |
| 80 | |
| 81 | # def _get_chat_completion_usage(completion: ChatCompletion) -> OpenAICompletionUsage: |
nothing calls this directly
no outgoing calls
no test coverage detected