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

Closes #316 #317

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

Conversation

vmahe35
Copy link

@vmahe35 vmahe35 commented Dec 18, 2024

Issue # (if applicable)

Closes #316

Reason for this change

Need to be able to support frameworks such as Ollama which provide an OpenAI compatible interface.

Therefore, it would make sense to be able to configure another baseUrl parameter for the endpoints than the default OpenAI endpoint (https://api.openai.com/v1).

Description of changes

I the needed code to add a new langgraph.openai.baseUrl parameter in the settings of the aws-genai plugin, that would look like this:

genai:
  agents:
    general: # This matches the URL in the frontend
      description: ...
      prompt: ...
      langgraph:
        openai:
          baseUrl: ${OPENAI_API_BASE_URL}
          apiKey: ${OPENAI_API_KEY}
          modelName: ${QUERY_MODEL_NAME}

Description of how you validated changes

Only tested it locally on my dev host at this point.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@vmahe35 vmahe35 requested a review from a team as a code owner December 18, 2024 15:03
@niallthomson
Copy link
Contributor

@vmahe35 thanks for the PR!

Can you run yarn prettier --write . to fix the formatting failures?

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.

feature: support OpenAI compatible APIs in aws-genai plugin
3 participants