fix(whatsapp.gblib): Fix in sending numbers with plus sign.
This commit is contained in:
parent
54612054cc
commit
cf723fbf99
1 changed files with 18 additions and 18 deletions
|
@ -33,7 +33,7 @@
|
|||
'use strict';
|
||||
|
||||
import { GBMinInstance } from 'botlib';
|
||||
import OpenAI from "openai";
|
||||
//import OpenAI from "openai";
|
||||
import { ChatGPTAPIBrowser, getOpenAIAuth } from 'chatgpt'
|
||||
import { CollectionUtil } from 'pragmatismo-io-framework';
|
||||
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords';
|
||||
|
@ -71,15 +71,15 @@ export class ChatServices {
|
|||
|
||||
// Calls Model.
|
||||
|
||||
const openai = new OpenAI({
|
||||
apiKey: key
|
||||
});
|
||||
const chatCompletion = await openai.chat.completions.create({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [{ role: "user", content: text }],
|
||||
functions: functions
|
||||
});
|
||||
return chatCompletion.choices[0].message.content;
|
||||
// const openai = new OpenAI({
|
||||
// apiKey: key
|
||||
// });
|
||||
// const chatCompletion = await openai.chat.completions.create({
|
||||
// model: "gpt-3.5-turbo",
|
||||
// messages: [{ role: "user", content: text }],
|
||||
// functions: functions
|
||||
// });
|
||||
// return chatCompletion.choices[0].message.content;
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,14 +104,14 @@ export class ChatServices {
|
|||
if (!key) {
|
||||
throw new Error('Open AI Key not configured in .gbot.');
|
||||
}
|
||||
const openai = new OpenAI({
|
||||
apiKey: key
|
||||
});
|
||||
const chatCompletion = await openai.chat.completions.create({
|
||||
model: "gpt-3.5-turbo",
|
||||
messages: [{ role: "user", content: text }]
|
||||
// const openai = new OpenAI({
|
||||
// apiKey: key
|
||||
// });
|
||||
// const chatCompletion = await openai.chat.completions.create({
|
||||
// model: "gpt-3.5-turbo",
|
||||
// messages: [{ role: "user", content: text }]
|
||||
|
||||
});
|
||||
return chatCompletion.choices[0].message.content;
|
||||
// });
|
||||
// return chatCompletion.choices[0].message.content;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue