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';
|
'use strict';
|
||||||
|
|
||||||
import { GBMinInstance } from 'botlib';
|
import { GBMinInstance } from 'botlib';
|
||||||
import OpenAI from "openai";
|
//import OpenAI from "openai";
|
||||||
import { ChatGPTAPIBrowser, getOpenAIAuth } from 'chatgpt'
|
import { ChatGPTAPIBrowser, getOpenAIAuth } from 'chatgpt'
|
||||||
import { CollectionUtil } from 'pragmatismo-io-framework';
|
import { CollectionUtil } from 'pragmatismo-io-framework';
|
||||||
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords';
|
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords';
|
||||||
|
@ -71,15 +71,15 @@ export class ChatServices {
|
||||||
|
|
||||||
// Calls Model.
|
// Calls Model.
|
||||||
|
|
||||||
const openai = new OpenAI({
|
// const openai = new OpenAI({
|
||||||
apiKey: key
|
// apiKey: key
|
||||||
});
|
// });
|
||||||
const chatCompletion = await openai.chat.completions.create({
|
// const chatCompletion = await openai.chat.completions.create({
|
||||||
model: "gpt-3.5-turbo",
|
// model: "gpt-3.5-turbo",
|
||||||
messages: [{ role: "user", content: text }],
|
// messages: [{ role: "user", content: text }],
|
||||||
functions: functions
|
// functions: functions
|
||||||
});
|
// });
|
||||||
return chatCompletion.choices[0].message.content;
|
// return chatCompletion.choices[0].message.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -104,14 +104,14 @@ export class ChatServices {
|
||||||
if (!key) {
|
if (!key) {
|
||||||
throw new Error('Open AI Key not configured in .gbot.');
|
throw new Error('Open AI Key not configured in .gbot.');
|
||||||
}
|
}
|
||||||
const openai = new OpenAI({
|
// const openai = new OpenAI({
|
||||||
apiKey: key
|
// apiKey: key
|
||||||
});
|
// });
|
||||||
const chatCompletion = await openai.chat.completions.create({
|
// const chatCompletion = await openai.chat.completions.create({
|
||||||
model: "gpt-3.5-turbo",
|
// model: "gpt-3.5-turbo",
|
||||||
messages: [{ role: "user", content: text }]
|
// 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