MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / get_first_message_content

Function get_first_message_content

api/openai_client.py:58–62  ·  view source on GitHub ↗

r"""When we only need the content of the first message. It is the default parser for chat completion.

(completion: ChatCompletion)

Source from the content-addressed store, hash-verified

56
57# completion parsing functions and you can combine them into one singple chat completion parser
58def get_first_message_content(completion: ChatCompletion) -> str:
59 r"""When we only need the content of the first message.
60 It is the default parser for chat completion."""
61 log.debug(f"raw completion: {completion}")
62 return completion.choices[0].message.content
63
64
65# def _get_chat_completion_usage(completion: ChatCompletion) -> OpenAICompletionUsage:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected