mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: adjust website tools; trim gemini intermediate response
This commit is contained in:
parent
41be6befec
commit
0fae49d5d1
2 changed files with 56 additions and 61 deletions
|
|
@ -281,10 +281,10 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient {
|
|||
// functionCall
|
||||
const functionCall = responseContent.parts.filter(i => i.functionCall).map(i => i.functionCall)
|
||||
const text = responseContent.parts.find(i => i.text)?.text
|
||||
if (text) {
|
||||
if (text && text.trim()) {
|
||||
// send reply first
|
||||
logger.info('send message: ' + text)
|
||||
opt.replyPureTextCallback && await opt.replyPureTextCallback(text)
|
||||
logger.info('send message: ' + text.trim())
|
||||
opt.replyPureTextCallback && await opt.replyPureTextCallback(text.trim())
|
||||
}
|
||||
let /** @type {FunctionResponse[]} **/ fcResults = []
|
||||
for (let fc of functionCall) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue