new(all): Azure OpenAI added as new LLM provider.

This commit is contained in:
Rodrigo Rodriguez 2024-05-25 10:41:33 -03:00
parent 665b4b28e8
commit 742aa53f88
3 changed files with 4 additions and 3 deletions

View file

@ -316,7 +316,7 @@ export class GBDeployer implements IGBDeployer {
const azureOpenAIKey = await min.core.getParam(min.instance, 'Azure Open AI Key', null);
const azureOpenAIVersion = await min.core.getParam(min.instance, 'Azure Open AI Version', null);
const azureOpenAIApiInstanceName = await min.core.getParam(min.instance, 'Azure Open AI Instance Name', null);
const azureOpenAIApiInstanceName = await min.core.getParam(min.instance, 'Azure Open AI Instance', null);
const azureOpenAIDeployment = await min.core.getParam(min.instance, 'Azure Open AI Deployment', null);
let embedding;

View file

@ -785,7 +785,7 @@ export class GBMinService {
min.sandBoxMap = {};
min['scheduleMap'] = {};
min['conversationWelcomed'] = {};
if (await min.core.getParam(min.instance, 'Azure Open AI Instance Name', null)) {
if (await min.core.getParam(min.instance, 'Azure Open AI Instance', null)) {
const gbkbPath = DialogKeywords.getGBAIPath(min.botId, 'gbkb');
min['vectorStorePath'] = Path.join('work', gbkbPath, 'docs-vectorized');
min['vectorStore'] = await this.deployer.loadOrCreateEmptyVectorStore(min);

View file

@ -184,7 +184,8 @@ export class ChatServices {
sanitizedQuestion: string,
numDocuments: number = 100
): Promise<string> {
if (sanitizedQuestion === '') {
if (sanitizedQuestion === '' || !vectorStore) {
return '';
}