Skip to content

Commit

Permalink
fix: agent chat use zhipu
Browse files Browse the repository at this point in the history
  • Loading branch information
csunny committed Jan 17, 2024
1 parent 542b6dd commit a1ef7c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbgpt/agent/agents/llm/llm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async def _completions_create(self, llm_model, params):
payload["model_cache_enable"] = self.model_cache_enable
try:
model_request = _build_model_request(payload)
model_output = await self._llm_client.generate(model_request)
model_output = await self._llm_client.generate(model_request.copy())
parsed_output = self._output_parser.parse_model_nostream_resp(
model_output, "###"
)
Expand Down
2 changes: 1 addition & 1 deletion dbgpt/serve/agent/agents/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async def _build_agent_context(
worker_manager = CFG.SYSTEM_APP.get_component(
ComponentType.WORKER_MANAGER_FACTORY, WorkerManagerFactory
).create()
llm_task = DefaultLLMClient(worker_manager)
llm_task = DefaultLLMClient(worker_manager, auto_convert_message=True)
context: AgentContext = AgentContext(conv_id=conv_id, llm_provider=llm_task)
context.gpts_name = gpts_instance.gpts_name
context.resource_db = resource_db
Expand Down

0 comments on commit a1ef7c2

Please sign in to comment.