Skip to content

Commit

Permalink
fixed import, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
robgruen committed Dec 12, 2024
1 parent 81d9c9b commit 76d426d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ts/packages/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 4 additions & 5 deletions ts/packages/api/src/typeAgentServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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`;

}
Expand All @@ -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}.`);
}
}

Expand Down

0 comments on commit 76d426d

Please sign in to comment.