Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebo committed Feb 5, 2024
1 parent 918eac6 commit 744b07f
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions python/samples/04.ai.a.teamsChefBot/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,34 @@
from botbuilder.schema import Activity
from fastapi import FastAPI, Request, Response
from teams import (
AIHistoryOptions,
AIOptions,
Application,
ApplicationOptions,
AzureOpenAIPlanner,
AzureOpenAIPlannerOptions,
TurnState,
)

from src.config import Config

# Initialize Teams AI application
planner = AzureOpenAIPlanner(
AzureOpenAIPlannerOptions(
Config.AZURE_OPENAI_KEY,
Config.AZURE_OPENAI_MODEL_DEPLOYMENT_NAME,
Config.AZURE_OPENAI_ENDPOINT,
prompt_folder="src/prompts",
)
)
# planner = AzureOpenAIPlanner(
# AzureOpenAIPlannerOptions(
# Config.AZURE_OPENAI_KEY,
# Config.AZURE_OPENAI_MODEL_DEPLOYMENT_NAME,
# Config.AZURE_OPENAI_ENDPOINT,
# prompt_folder="src/prompts",
# )
# )
storage = MemoryStorage()
app = Application[TurnState](
ApplicationOptions(
auth=BotFrameworkAdapterSettings(
app_id=Config.BOT_ID,
app_password=Config.BOT_PASSWORD,
),
ai=AIOptions(
planner=planner,
prompt="chat",
history=AIHistoryOptions(assistant_history_type="text"),
),
# ai=AIOptions(
# planner=planner,
# prompt="chat",
# history=AIHistoryOptions(assistant_history_type="text"),
# ),
storage=storage,
)
)
Expand Down

0 comments on commit 744b07f

Please sign in to comment.