Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAI assistant integration #154

Open
constantinidan opened this issue Nov 29, 2024 · 0 comments
Open

Add OpenAI assistant integration #154

constantinidan opened this issue Nov 29, 2024 · 0 comments

Comments

@constantinidan
Copy link
Contributor

constantinidan commented Nov 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant