Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions packages/chatbot-server-mongodb-public/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ export const openAiClient = wrapOpenAI(
})
);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wasn't working and also redudant with the other azureOpenAi provider. remove this, and switch to azureOpenAi provider below to make work

// For parts of the application that use the Vercel AI SDK
export const azure = createAzure({
apiKey: OPENAI_API_KEY,
resourceName: OPENAI_RESOURCE_NAME,
apiVersion: OPENAI_API_VERSION,
});

export const embeddedContentStore = makeMongoDbEmbeddedContentStore({
connectionUri: MONGODB_CONNECTION_URI,
databaseName: MONGODB_DATABASE_NAME,
Expand Down Expand Up @@ -220,13 +213,6 @@ export const loadPage = wrapTraced(pageStore.loadPage, {
name: "loadPageFromStore",
});

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was unused

export const preprocessorOpenAiClient = wrapOpenAI(
new AzureOpenAI({
apiKey: OPENAI_API_KEY,
endpoint: OPENAI_ENDPOINT,
apiVersion: OPENAI_API_VERSION,
})
);
export const mongodb = new MongoClient(MONGODB_CONNECTION_URI);

export const conversations = makeMongoDbConversationsService(
Expand Down Expand Up @@ -373,7 +359,7 @@ const addMessageToConversationUpdateTrace =
embeddingModelName: OPENAI_RETRIEVAL_EMBEDDING_DEPLOYMENT,
scrubbedMessageStore,
analyzerModel: wrapLanguageModel({
model: azure(OPENAI_ANALYZER_CHAT_COMPLETION_DEPLOYMENT),
model: azureOpenAi(OPENAI_ANALYZER_CHAT_COMPLETION_DEPLOYMENT),
middleware: [BraintrustMiddleware({ debug: true })],
}),
});
Expand Down