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 integration #778

Merged
merged 3 commits into from Mar 1, 2024
Merged

Conversation

tpatel
Copy link
Collaborator

@tpatel tpatel commented Feb 28, 2024

  • This simplifies instrumenting OpenAI calls
  • Reuses the literalai OpenAI instrumentation
  • Creates a new step for each OpenAI call, with the call details in the generation property

Depends on https://github.com/Chainlit/python-client/pull/43

- This simplifies instrumenting OpenAI calls
- Reuses the literalai OpenAI instrumentation
- Creates a new step for each OpenAI call, with the call details in the generation property
Copy link
Collaborator

@willydouhard willydouhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small comment on the generation.model

backend/chainlit/openai/__init__.py Outdated Show resolved Hide resolved
- This makes sure any children step starts after the parent message step
- replaced `generation.settings.model` by `generation.model`
- avoids erroring if a user isn't using `instrument_openai` and hasn't installed openai
@willydouhard willydouhard merged commit 3179d29 into Chainlit:main Mar 1, 2024
6 checks passed
@tpatel tpatel deleted the tp/openai-integration branch March 5, 2024 12:59
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

Successfully merging this pull request may close these issues.

None yet

2 participants