Parcourir la source

Update 第九章 上下文工程.md

weijia cheng il y a 10 mois
Parent
commit
5ee1ee00c4
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      docs/chapter9/第九章 上下文工程.md

+ 1 - 1
docs/chapter9/第九章 上下文工程.md

@@ -731,7 +731,7 @@ class ContextAwareAgent(SimpleAgent):
             {"role": "system", "content": optimized_context},
             {"role": "user", "content": user_input}
         ]
-        response = self.llm.invoke(optimized_context)
+        response = self.llm.invoke(message)
 
         # 3. 更新对话历史
         from hello_agents.core.message import Message