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

🚀 Azure Openai #1292

Merged
merged 5 commits into from Sep 25, 2023
Merged

🚀 Azure Openai #1292

merged 5 commits into from Sep 25, 2023

Conversation

awtkns
Copy link
Contributor

@awtkns awtkns commented Sep 20, 2023

No description provided.

@vercel
Copy link

vercel bot commented Sep 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2023 6:03pm

@@ -55,7 +50,7 @@ async def workflow_chat(
input_variables=["history", "message", "similar_docs"], template=template
)

llm = create_model(body.model_settings, user=user, streaming=True)
llm = create_model(settings, body.model_settings, user=user, streaming=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

why pass in settings instead of just importing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes it easier for testing

# Conflicts:
#	platform/poetry.lock
#	platform/pyproject.toml
#	platform/reworkd_platform/tests/test_settings.py
#	platform/reworkd_platform/web/api/workflow/blocks/web/__init__.py
#	platform/reworkd_platform/web/api/workflowchat/views.py
@awtkns awtkns merged commit 7010221 into main Sep 25, 2023
7 checks passed
@FireSK7
Copy link

FireSK7 commented Sep 27, 2023

What happened about this issue, seems like you change the way setting up Azure api key for AagentGPT, Can you demonstrate about that?

@w-edd
Copy link

w-edd commented Feb 7, 2024

What happened about this issue, seems like you change the way setting up Azure api key for AagentGPT, Can you demonstrate about that?

According to this

    use_azure = (
        not model_settings.custom_api_key and "azure" in settings.openai_api_base
    )

and this

    settings.openai_api_base = (
        "https://api.openai.com" if not use_azure else "https://oai.azure.com"
    )

Looks like one needs to have this setting in platform/.env

REWORKD_PLATFORM_OPENAI_API_BASE=https://oai.azure.com

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

4 participants