Skip to content

Commit

Permalink
Merge pull request #12227 from OfficeDev/bowsong/hotfix_remote
Browse files Browse the repository at this point in the history
fix: fix remote run for ai generator python template
  • Loading branch information
kimizhu authored Aug 15, 2024
2 parents 4ae3227 + d0102ed commit b2df3df
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
serverFarmId: serverfarm.id
siteConfig: {
alwaysOn: true
appCommandLine: 'gunicorn --bind 0.0.0.0 --worker-class aiohttp.worker.GunicornWebWorker --timeout 600 app:app'
appCommandLine: 'gunicorn --bind 0.0.0.0 --worker-class aiohttp.worker.GunicornWebWorker --timeout 600 --chdir src app:app'
linuxFxVersion: pythonVersion
appSettings: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python-dotenv
aiohttp
teams-ai~=1.2.0
requests~=2.32.3
pyyaml~=6.0.1
openapi-pydantic~=0.4.1
jsonref~=1.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ model = OpenAIModel(
)
{{/useOpenAI}}

prompts = PromptManager(PromptManagerOptions(prompts_folder=f"{os.getcwd()}/prompts"))
prompts_folder_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "prompts")
prompts = PromptManager(PromptManagerOptions(prompts_folder=f"{prompts_folder_path}"))

planner = ActionPlanner(
ActionPlannerOptions(model=model, prompts=prompts, default_prompt="chat")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ deploy:
- uses: azureAppService/zipDeploy
with:
# Deploy base folder
artifactFolder: src
artifactFolder: .
# Ignore file location, leave blank will ignore nothing
ignoreFile: .webappignore
# The resource id of the cloud resource to be deployed to.
Expand Down Expand Up @@ -133,4 +133,4 @@ publish:
# Write the information of created resources into environment file for
# the specified environment variable(s).
writeToEnvironmentFile:
publishedAppId: TEAMS_APP_PUBLISHED_APP_ID
publishedAppId: TEAMS_APP_PUBLISHED_APP_ID

0 comments on commit b2df3df

Please sign in to comment.