Skip to content

fix: update ai environment variables #1331

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 1 commit into
base: main
Choose a base branch
from

Conversation

Marukome0743
Copy link
Contributor

@Marukome0743 Marukome0743 commented Apr 11, 2025

Summary

At #1133, some ai environment variables are renamed.
This PR updates them and add the missing ones in docker-compose.yml and docker-compose-ci.yml.

Summary by Sourcery

Update AI service environment variables in docker-compose.yml to support additional configuration options

Enhancements:

  • Expand environment variable configuration for AI service to include additional providers and connection settings

Deployment:

  • Update docker-compose configuration to include new environment variables for AI service, such as Anthropic API key, AWS credentials, and S3 bucket settings

Copy link

sourcery-ai bot commented Apr 11, 2025

Reviewer's Guide by Sourcery

This pull request updates the AI environment variables in docker-compose.yml to match the changes made in the AI service. It renames existing variables and adds new ones for Anthropic API key, AWS credentials, MinIO configuration, and other AI-related settings.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated and added AI environment variables to align with changes in the AI service.
  • Renamed APPFLOWY_AI_SERVER_PORT to AI_SERVER_PORT.
  • Renamed APPFLOWY_AI_DATABASE_URL to AI_DATABASE_URL.
  • Renamed APPFLOWY_AI_REDIS_URL to AI_REDIS_URL.
  • Added ANTHROPIC_API_KEY.
  • Added AI_AWS_ACCESS_KEY_ID.
  • Added AI_AWS_SECRET_ACCESS_KEY.
  • Added AI_APPFLOWY_BUCKET_NAME.
  • Added AI_USE_MINIO.
  • Added AI_MINIO_URL.
  • Added AI_APPFLOWY_HOST.
  • Added SUPPORT_OPENAI_V3_IMAGE_MODEL.
docker-compose.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Marukome0743 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a comment explaining the purpose of the SUPPORT_OPENAI_V3_IMAGE_MODEL environment variable.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

- ANTHROPIC_API_KEY=${AI_ANTHROPIC_API_KEY}
- AI_AWS_ACCESS_KEY_ID=${APPFLOWY_S3_ACCESS_KEY}
- AI_AWS_SECRET_ACCESS_KEY=${APPFLOWY_S3_SECRET_KEY}
- AI_APPFLOWY_BUCKET_NAME=${AI_APPFLOWY_BUCKET_NAME}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I will need to check if these env variable are being used at all.

@khorshuheng
Copy link
Collaborator

While the variables were renamed in the PR, they are applicable to the private AppFlowy AI image used by our managed service, rather than the public AppFlowy AI image which is available for self hosters. You would see, that the image on docker compose CI is actually different from the one in docker compose. One has the premium suffix, the other one doesn't.

Nevertheless, these inconsistencies are indeed confusing. So we might update the current public AppFlowy AI image to adopt the same env variable as the premium variant.

@Marukome0743 Marukome0743 force-pushed the ai branch 4 times, most recently from e0c4d35 to 44b9de9 Compare May 14, 2025 00:59
@Marukome0743 Marukome0743 force-pushed the ai branch 5 times, most recently from 2c9c4c4 to bed752a Compare May 30, 2025 00:19
@Marukome0743 Marukome0743 force-pushed the ai branch 5 times, most recently from 2536a7d to debcba5 Compare June 8, 2025 12:03
@Marukome0743 Marukome0743 force-pushed the ai branch 6 times, most recently from bb0e5e7 to 0047db2 Compare June 16, 2025 02:40
@Marukome0743 Marukome0743 force-pushed the ai branch 4 times, most recently from 8b0165e to 83ab120 Compare June 24, 2025 04:23
@Marukome0743 Marukome0743 force-pushed the ai branch 3 times, most recently from eb03a80 to 2e7b645 Compare June 30, 2025 01:11
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.

2 participants