Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Add OpenAI assistant integration #154

@constantinidan

Description

@constantinidan

Create a method to log threads, runs of OpenAI Assistants. Check https://platform.openai.com/docs/assistants/overview.
Thread API: https://docs.literalai.com/python-client/api-reference/thread
Step API: https://docs.literalai.com/python-client/api-reference/step (steps can be step, runs, messages)
Generation API: https://docs.literalai.com/python-client/api-reference/api#create-generation

# pull the OAI assistant thread

with literalai_client.thread() as thread:
      for run in runs:
            for step in run:
                   # log steps
      for message in messages_from_openai_thread:
           # log message in literalai

Example here: https://github.com/Chainlit/literalai-typescript/blob/main/src/instrumentation/openai-syncer.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions