Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add safetySettings, set block_none #136

Merged
merged 1 commit into from Jan 30, 2024
Merged

Conversation

ccoder64
Copy link
Contributor

Description

add safetySettings strategy, fix error

Error: [GoogleGenerativeAI Error]: Text not available. Response was blocked due to SAFETY
    at response.text (file:///usr/src/node_modules/.pnpm/@fuyun+generative-ai@0.1.3/node_modules/@fuyun/generative-ai/dist/index.mjs:259:19)
    at Object.start (file:///usr/src/dist/server/chunks/pages/generate.ts.2a0d54ba.mjs:47:34)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
sendMessageStream() was unsuccessful. Response was blocked due to SAFETY. Inspect response object for details.

test case 【讲个笑话】

Linked Issues

#130
#74

Additional context

Copy link

netlify bot commented Jan 17, 2024

👷 Deploy request for heroic-yeot-d77ce3 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3d3447c

Copy link

netlify bot commented Jan 17, 2024

👷 Deploy request for clinquant-rugelach-6e6c15 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3d3447c

Copy link

vercel bot commented Jan 17, 2024

@ccoder64 is attempting to deploy a commit to the My Team Team on Vercel.

A member of the Team first needs to authorize it.

@babaohuang
Copy link
Owner

不好意思,最近事情有点多,现在才看到PR消息,请问您这个加入以后有测试一下看看吗,我之前有尝试过加这些参数,但是报错了

@ccoder64
Copy link
Contributor Author

不好意思,最近事情有点多,现在才看到PR消息,请问您这个加入以后有测试一下看看吗,我之前有尝试过加这些参数,但是报错了

嗯,抱歉忘记看了,有验证过可以正常生效

@babaohuang babaohuang merged commit 1d044a3 into babaohuang:main Jan 30, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants