Skip to content

Add openai as a hard dependency #91

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add openai as a hard dependency #91

wants to merge 2 commits into from

Conversation

cpsievert
Copy link
Collaborator

Adds openai as a hard dependency so that a handful of chat providers can be used without an additional install. This also helps avoid a confusing install error when tools are used.

Closes #22

@cpsievert cpsievert requested a review from Copilot May 8, 2025 15:11
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the dependency management by adding openai as a hard dependency so that all chat provider modules no longer require separate installation instructions for openai. Key changes include:

  • Adding "openai" to the core dependencies in pyproject.toml.
  • Removing redundant installation callout notes and try/except blocks for the openai package in multiple provider files.
  • Updating provider extras in pyproject.toml to empty lists for modules that previously listed openai.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Adds openai as a hard dependency and updates provider extras to reflect the change.
chatlas/_perplexity.py Removes openai installation guidance from the documentation callout.
chatlas/_openai.py Eliminates the try/except ImportError block and related callout notes.
chatlas/_ollama.py Removes openai installation instructions from documentation callout.
chatlas/_groq.py Removes redundant openai requirement callouts from documentation.
chatlas/_github.py Removes openai installation instructions from documentation callout.
chatlas/_databricks.py Updates the package installation message and removes try/except block for openai.

databricks = ["databricks-sdk[openai]"]
github = ["openai"]
databricks = ["databricks-sdk"]
github = []
Copy link
Preview

Copilot AI May 8, 2025

Choose a reason for hiding this comment

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

Since openai is now a hard dependency, consider adding a comment in pyproject.toml explaining that the provider extras such as 'github', 'groq', 'ollama', etc. are intentionally left empty.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ooh, I kinda agree with Copilot! That's a first 😄

Copy link
Contributor

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

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

Looks good, the diff very clearly demonstrates that this is a good choice!

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.

Bug: Unable to use Ollama and chat app without also installing/configuring openai package
2 participants