Skip to content

如何配置DeepSeek API #24

@skansgai

Description

@skansgai

配置文件:

# Debug Settings
IS_DEBUG: false

# Proxy Settings
#MODEL_PROXY: http://127.0.0.1:7890
#TOOL_PROXY: http://127.0.0.1:7890

# Model Settings
MODEL_PROVIDER: DeepSeek
MODEL_URL: <https://api.deepseek.com>
MODEL_AUTH:
  api_key: "XXXX"
MODEL_OPTIONS:
  model: deepseek-reasoner 
  # 你可能还需要其他的配置,取决于 DeepSeek API 文档

# Application Settings
MAX_COLUMN_NUM: 3
OUTPUT_LANGUAGE: Chinise
MAX_SEARCH_RESULTS: 8
SLEEP_TIME: 5

# News time limit: 'd' as day,'w' as week,'m' as month
NEWS_TIME_LIMIT: d

# Outline Settings
USE_CUSTOMIZE_OUTLINE: false
CUSTOMIZE_OUTLINE:
  report_title: "Today's News about Large Model Applications"
  column_list:
    - column_title: New Apps
      column_requirement: Looking for those applications powered by large models which announced recently
      search_keywords: large model application announce this week
    - column_title: Hot Apps
      column_requirement: Looking for those applications powered by large models which are most popular or are discussed most
      search_keywords: large model application popular hot 
    - column_title: Fun Apps
      column_requirement: Looking for those applications powered by large models which are funny or inspirational
      search_keywords: large model application cool fun inspire

错误日志:
Exception in thread Thread-2:
Traceback (most recent call last):
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 210, in start_async
event_generator = await self.request.get_event_generator(request_type)
File "D:\soft\miniconda3\lib\site-packages\Agently\Request\Request.py", line 101, in get_event_generator
request_plugin_instance = self.plugin_manager.get("request", model_name)(request = self)
File "D:\soft\miniconda3\lib\site-packages\Agently\utils\PluginManager.py", line 45, in get
raise Exception(f"[Plugin Manager] Plugin '{ plugin_name }' is not in the plugins runtime_ctx of module '{ module_name }'.")
Exception: [Plugin Manager] Plugin 'DeepSeek' is not in the plugins runtime_ctx of module 'request'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 210, in start_async
event_generator = await self.request.get_event_generator(request_type)
File "D:\soft\miniconda3\lib\site-packages\Agently\Request\Request.py", line 101, in get_event_generator
request_plugin_instance = self.plugin_manager.get("request", model_name)(request = self)
File "D:\soft\miniconda3\lib\site-packages\Agently\utils\PluginManager.py", line 45, in get
raise Exception(f"[Plugin Manager] Plugin '{ plugin_name }' is not in the plugins runtime_ctx of module '{ module_name }'.")
Exception: [Plugin Manager] Plugin 'DeepSeek' is not in the plugins runtime_ctx of module 'request'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 298, in start_in_theard
reply = loop.run_until_complete(self.start_async(request_type))
File "D:\soft\miniconda3\lib\asyncio\base_events.py", line 612, in run_until_complete
return future.result()
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 285, in start_async
return await self.start_async(request_type, return_generator=return_generator)
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 285, in start_async
return await self.start_async(request_type, return_generator=return_generator)
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 279, in start_async
raise(e)
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 210, in start_async
event_generator = await self.request.get_event_generator(request_type)
File "D:\soft\miniconda3\lib\site-packages\Agently\Request\Request.py", line 101, in get_event_generator
request_plugin_instance = self.plugin_manager.get("request", model_name)(request = self)
File "D:\soft\miniconda3\lib\site-packages\Agently\utils\PluginManager.py", line 45, in get
raise Exception(f"[Plugin Manager] Plugin '{ plugin_name }' is not in the plugins runtime_ctx of module '{ module_name }'.")
Exception: [Plugin Manager] Plugin 'DeepSeek' is not in the plugins runtime_ctx of module 'request'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\soft\miniconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "D:\soft\miniconda3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\soft\miniconda3\lib\site-packages\Agently\Agent\Agent.py", line 302, in start_in_theard
raise Exception(f"[Agent Request] Error: { str(e) }")
Exception: [Agent Request] Error: [Plugin Manager] Plugin 'DeepSeek' is not in the plugins runtime_ctx of module 'request'.
2025-02-27 14:43:51,426 [INFO] [Outline Generated] None
2025-02-27 14:43:56,429 - ERROR - Node Execution Exception-'generate_columns'(81168abd-f883-484a-8554-9d767ac7b3af):
'NoneType' object is not subscriptable
Traceback (most recent call last):
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 341, in _exec_chunk_with_dep_core
exec_res = chunk_executor(input_value, self.store)
File "E:\Agently-Daily-News-Collector\workflows\main_workflow.py", line 58, in generate_columns_executor
for column_outline in outline["column_list"]:
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "app.py", line 34, in
main_workflow.start(
File "E:\Agently-Daily-News-Collector\workflows\main_workflow.py", line 110, in start
main_workflow.start()
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\Workflow.py", line 130, in start
return run_async(self.start_async(start_data, storage=storage))
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\utils\runner.py", line 33, in run_async
return future.result()
File "D:\soft\miniconda3\lib\concurrent\futures_base.py", line 432, in result
return self.__get_result()
File "D:\soft\miniconda3\lib\concurrent\futures_base.py", line 388, in __get_result
raise self._exception
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\utils\runner.py", line 22, in runner
result = loop.run_until_complete(coro)
File "D:\soft\miniconda3\lib\asyncio\base_events.py", line 612, in run_until_complete
return future.result()
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\Workflow.py", line 126, in start_async
res = await self.executor.start(executed_schema, start_data, storage=storage)
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 48, in start
await self._execute_main(executed_schema.get('entries') or [])
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 103, in _execute_main
await asyncio.gather(*entry_tasks)
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 89, in execute_from_entry
await self._execute_partial(
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 177, in _execute_partial
await asyncio.gather(*next_child_tasks)
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 148, in _execute_partial
await execute_child_chunk(next_chunk)
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 131, in execute_child_chunk
child_executed = await self._execute_single_chunk(
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 205, in _execute_single_chunk
await self._execute_single_chunk_core(
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 232, in _execute_single_chunk_core
exec_res = await self._exec_chunk_with_dep_core(chunk, single_dep_map)
File "D:\soft\miniconda3\lib\site-packages\Agently\Workflow\MainExecutor.py", line 345, in _exec_chunk_with_dep_core
raise Exception(e)
Exception: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions