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

Disable azure #106

Merged
merged 3 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class GizmoAgentType(str, Enum):
GPT_35_TURBO = "GPT 3.5 Turbo"
# GPT_4 = "GPT 4"
AZURE_OPENAI = "GPT 4 (Azure OpenAI)"
# AZURE_OPENAI = "GPT 4 (Azure OpenAI)"
CLAUDE2 = "Claude 2"
BEDROCK_CLAUDE2 = "Claude 2 (Amazon Bedrock)"

Expand Down
23 changes: 11 additions & 12 deletions backend/packages/gizmo-agent/gizmo_agent/main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import os
from typing import Any, Mapping, Optional, Sequence

from agent_executor.checkpoint import RedisCheckpoint
from agent_executor.dnd import create_dnd_bot
from agent_executor.permchain import get_agent_executor
from langchain.chat_models import AzureChatOpenAI, ChatOpenAI
from langchain.chat_models import ChatOpenAI
from langchain.pydantic_v1 import BaseModel, Field
from langchain.schema.messages import AnyMessage
from langchain.schema.runnable import (
Expand Down Expand Up @@ -56,8 +55,8 @@ def __init__(
_agent = get_openai_function_agent(_tools, system_message)
# elif agent == GizmoAgentType.GPT_4:
# _agent = get_openai_function_agent(_tools, system_message, gpt_4=True)
elif agent == GizmoAgentType.AZURE_OPENAI:
_agent = get_openai_function_agent(_tools, system_message, azure=True)
# elif agent == GizmoAgentType.AZURE_OPENAI:
# _agent = get_openai_function_agent(_tools, system_message, azure=True)
elif agent == GizmoAgentType.CLAUDE2:
_agent = get_xml_agent(_tools, system_message)
elif agent == GizmoAgentType.BEDROCK_CLAUDE2:
Expand Down Expand Up @@ -90,14 +89,14 @@ class AgentOutput(BaseModel):
).configurable_alternatives(
ConfigurableField(id="llm", name="LLM"),
default_key="gpt-35-turbo",
azure_openai=AzureChatOpenAI(
temperature=0,
deployment_name=os.environ["AZURE_OPENAI_DEPLOYMENT_NAME"],
openai_api_base=os.environ["AZURE_OPENAI_API_BASE"],
openai_api_version=os.environ["AZURE_OPENAI_API_VERSION"],
openai_api_key=os.environ["AZURE_OPENAI_API_KEY"],
streaming=True,
),
# azure_openai=AzureChatOpenAI(
# temperature=0,
# deployment_name=os.environ["AZURE_OPENAI_DEPLOYMENT_NAME"],
# openai_api_base=os.environ["AZURE_OPENAI_API_BASE"],
# openai_api_version=os.environ["AZURE_OPENAI_API_VERSION"],
# openai_api_key=os.environ["AZURE_OPENAI_API_KEY"],
# streaming=True,
# ),
)


Expand Down
1 change: 0 additions & 1 deletion backend/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenGPTs</title>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
Expand Down
1 change: 0 additions & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenGPTs</title>
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
Expand Down