feat: comment system instruction

Signed-off-by: SouthFox <master@southfox.me>
This commit is contained in:
SouthFox 2024-08-29 10:26:15 +08:00
parent 84266cab34
commit 9304e24c8c

4
app.py
View file

@ -22,12 +22,12 @@ def generate():
vertexai.init(project=PROJECT_ID, location="us-central1") vertexai.init(project=PROJECT_ID, location="us-central1")
model = GenerativeModel( model = GenerativeModel(
"gemini-1.5-flash-001", "gemini-1.5-flash-001",
system_instruction=[textsi_1] # system_instruction=[textsi_1]
) )
return model.start_chat() return model.start_chat()
textsi_1 = """你要用中文回答一个德语刚入门的新手的回答,先用德语回答然后在用中文解释这个回答并给出建议""" # textsi_1 = """你要用中文回答一个德语刚入门的新手的回答,先用德语回答然后在用中文解释这个回答并给出建议"""
generation_config = { generation_config = {
"max_output_tokens": 1024, "max_output_tokens": 1024,