Maxim Docs home pagelight logodark logo
  • Home
  • Careers
  • Blog
  • Pricing
  • Get started free
  • Get started free
Documentation
SDK
API Reference
Self Hosting
  • Blog
  • Cookbooks
  • Tutorials
  • Overview
    • Introduction
    Python
    • Overview
    • Integrations
    • Reference
      • Apis
      • Cache
      • Maxim
      • Expiring Key Value Store
      • Scribe
      • Filter Objects
      • Dataset
      • Decorators
      • Evaluators
      • Logger
        • anthropic.Client
        • Message
        • StreamManager
        • anthropic.Utils
        • bedrock.AsyncClient
        • bedrock.Client
        • bedrock.Utils
        • components.Attachment
        • Base
        • Error
        • Feedback
        • components.Generation
        • components.Retrieval
        • Session
        • components.Span
        • components.ToolCall
        • components.Trace
        • Types
        • components.Utils
        • crewai.Client
        • crewai.Utils
        • gemini.AsyncClient
        • gemini.Client
        • gemini.Utils
        • langchain.Tracer
        • langchain.Utils
        • litellm.Tracer
        • litellm_proxy.Tracer
        • AgentSession
        • GeminiRealtimeSession
        • Instrumenter
        • Handler
        • RealtimeSession
        • Store
        • livekit.Utils
        • Logger
        • mistral.Utils
        • Container
        • AsyncChat
        • openai.AsyncClient
        • AsyncCompletions
        • Chat
        • openai.Utils
        • GenerationParser
        • TagsParser
        • portkey.Client
        • Portkey
        • logger.Utils
        • Writer
      • Models
      • Test_Runs
      • Tests
    • Upgrading to v3
    Typescript
    • Integrations
    • Reference
    Logger

    openai.Utils

    Utility functions and helpers for Openai integration.

    View module source on GitHub

    ​
    OpenAIUtils

    Copy
    Ask AI
    class OpenAIUtils()
    

    ​
    parse_completion_from_chunks

    Copy
    Ask AI
    @staticmethod
    def parse_completion_from_chunks(
            chunks: List[ChatCompletionChunk]) -> Dict[str, Any]
    

    Convert a list of ChatCompletionChunk objects into a combined response format.

    Was this page helpful?

    Chat
    Previous
    GenerationParser
    Next
    xgithublinkedin
    Powered by Mintlify
    On this page
    • OpenAIUtils
    • parse_completion_from_chunks
    Assistant
    Responses are generated using AI and may contain mistakes.