Skip to content

Commit

Permalink
Merge pull request #106 from langchain-ai/nc/disable-azure
Browse files Browse the repository at this point in the history
Disable azure
  • Loading branch information
nfcampos authored Dec 11, 2023
2 parents 32b6eda + d72f412 commit a3db922
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y libmagic1 && rm -rf /var/lib/apt/lists/
# Set the working directory
WORKDIR /backend

COPY ./backend .
COPY . .

This comment has been minimized.

Copy link
@fchenGT

fchenGT Dec 12, 2023

This will cause docker compose up to fail.


RUN rm poetry.lock

Expand Down
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

0 comments on commit a3db922

Please sign in to comment.