From 76d426dc9dfe4bc46fd2493555de9d28a5707a7c Mon Sep 17 00:00:00 2001 From: Robert Gruen Date: Thu, 12 Dec 2024 12:36:54 -0800 Subject: [PATCH] fixed import, updated readme --- ts/packages/api/README.md | 2 +- ts/packages/api/src/typeAgentServer.ts | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ts/packages/api/README.md b/ts/packages/api/README.md index 8ff9df408..64e17486a 100644 --- a/ts/packages/api/README.md +++ b/ts/packages/api/README.md @@ -6,7 +6,7 @@ TypeAgent API is a HTTP+WS API server for **TypeAgent sample code**. It explores ## Running -After setting up and building at the workspace root, there are several additional ways to start the server in this directory. +After setting up and building at the workspace root, there are several additional ways to start the server in this directory. It is also possible to use the [docker image](../../Dockerfile) to host TypeAgent either locally or in a cloud hosted environment such as [Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/quickstart-custom-container?tabs=dotnet&pivots=container-linux-vscode). ### Globally Link the package diff --git a/ts/packages/api/src/typeAgentServer.ts b/ts/packages/api/src/typeAgentServer.ts index c83c49309..17090f278 100644 --- a/ts/packages/api/src/typeAgentServer.ts +++ b/ts/packages/api/src/typeAgentServer.ts @@ -11,11 +11,10 @@ import { import { WebAPIClientIO } from "./webClientIO.js"; import { TypeAgentAPIWebSocketServer } from "./webSocketServer.js"; import { getDefaultAppAgentProviders } from "agent-dispatcher/internal"; -import { EnvVars } from "../../aiclient/dist/openai.js"; import { env } from "node:process"; import { BlobServiceClient, BlockBlobClient, ContainerClient, ContainerListBlobsOptions } from "@azure/storage-blob"; import { DefaultAzureCredential } from "@azure/identity"; -import { getEnvSetting } from "aiclient"; +import { getEnvSetting, openai } from "aiclient"; import { StopWatch } from "../../telemetry/dist/stopWatch.js"; import path from "node:path"; import fs from "node:fs"; @@ -36,8 +35,8 @@ export class TypeAgentServer { dotenv.config({ path: this.envPath }); // blob storage config - this.storageAccount = getEnvSetting(env, EnvVars.AZURE_STORAGE_ACCOUNT, undefined, undefined); - this.containerName = getEnvSetting(env, EnvVars.AZURE_STORAGE_CONTAINER, undefined, "sessions"); + this.storageAccount = getEnvSetting(env, openai.EnvVars.AZURE_STORAGE_ACCOUNT, undefined, undefined); + this.containerName = getEnvSetting(env, openai.EnvVars.AZURE_STORAGE_CONTAINER, undefined, "sessions"); this.accountURL = `https://${this.storageAccount}.blob.core.windows.net`; } @@ -62,7 +61,7 @@ export class TypeAgentServer { sw.stop("Downloaded Session Backup"); } else { - console.warn(`Blob backup enabled but NOT configured. Missing env var ${EnvVars.AZURE_STORAGE_ACCOUNT}.`); + console.warn(`Blob backup enabled but NOT configured. Missing env var ${openai.EnvVars.AZURE_STORAGE_ACCOUNT}.`); } }