@metreeca/llms
    Preparing search index...
    • Extracts the output text of a chat completion.

      Parameters

      • completion: ChatCompletion

        The completion of a chat.completions.create request

      Returns string

      The trimmed output text of the first choice of completion

      Error If completion carries no choice, if the model refused to generate, or if it stopped before producing complete output text