Add Azure OpenAI embedding support

This commit is contained in:
Derek Wischusen
2025-05-19 22:58:04 -04:00
parent ed0659aca6
commit 42be1f956a
6 changed files with 315 additions and 51 deletions
+14 -6
View File
@@ -180,15 +180,23 @@ export const getEmbeddingConfig = async (token: string) => {
};
type OpenAIConfigForm = {
key: string;
url: string;
key: string;
url: string;
};
type AzureOpenAIConfigForm = {
key: string;
url: string;
deployment: string;
version: string;
};
type EmbeddingModelUpdateForm = {
openai_config?: OpenAIConfigForm;
embedding_engine: string;
embedding_model: string;
embedding_batch_size?: number;
openai_config?: OpenAIConfigForm;
azure_openai_config?: AzureOpenAIConfigForm;
embedding_engine: string;
embedding_model: string;
embedding_batch_size?: number;
};
export const updateEmbeddingConfig = async (token: string, payload: EmbeddingModelUpdateForm) => {