优化Gemini提示词

This commit is contained in:
John Smith
2024-02-26 00:03:09 +08:00
parent 8c3d62d08d
commit 0d7f847dc8
3 changed files with 19 additions and 15 deletions

View File

@@ -688,7 +688,7 @@ class GeminiTranslate(TranslateProvider):
self._proxy = proxy or None
self._api_key = api_key
self._url = f'https://generativelanguage.googleapis.com/v1beta/{model_code}:generateContent'
self._prompt = prompt.replace('\n', ' ').replace('\\n', '\n')
self._prompt = prompt
self._body = {
'contents': [
{