Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -175,11 +175,15 @@ tools = [generate_and_upload_image, analyze_image_with_text]
|
|
| 175 |
llm = ChatGoogleGenerativeAI(google_api_key=google_api, model="gemini-2.0-flash", temperature=0.2)
|
| 176 |
|
| 177 |
# 建立提示模板
|
| 178 |
-
prompt_template = ChatPromptTemplate.from_messages([
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
("system", "你是一個強大的助理,可以根據用戶的請求使用提供的工具。"),
|
| 180 |
-
("user", "{input}")
|
| 181 |
-
|
| 182 |
-
])
|
| 183 |
|
| 184 |
prompt = PromptTemplate.from_template(prompt_template)
|
| 185 |
|
|
|
|
| 175 |
llm = ChatGoogleGenerativeAI(google_api_key=google_api, model="gemini-2.0-flash", temperature=0.2)
|
| 176 |
|
| 177 |
# 建立提示模板
|
| 178 |
+
# prompt_template = ChatPromptTemplate.from_messages([
|
| 179 |
+
# ("system", "你是一個強大的助理,可以根據用戶的請求使用提供的工具。"),
|
| 180 |
+
# ("user", "{input}"),
|
| 181 |
+
# ("placeholder", "{agent_scratchpad}"),
|
| 182 |
+
# ])
|
| 183 |
+
prompt_template = '''
|
| 184 |
("system", "你是一個強大的助理,可以根據用戶的請求使用提供的工具。"),
|
| 185 |
+
("user", "{input}")
|
| 186 |
+
'''
|
|
|
|
| 187 |
|
| 188 |
prompt = PromptTemplate.from_template(prompt_template)
|
| 189 |
|