20260804 langchain知识点复习

  1. ChatDeepseek
    • ChatXXX
  2. ChatOpenAI
  3. init_chat_model(model= “provider:modelname”)
  4. config
  5. configuable_file
  6. extra_body
  7. kwargs
  8. langsmith(就简单配几个环境变量就行)

20260812 tool知识点复习

  1. @tool
    1. description
    2. docs_string
    3. parse_docstring
    4. args_schema
      1. pydantic
        1. baseModel
        2. Field
        3. Literal
    5. name_or_callable
    6. bind_tools
      1. tool_choice
        1. None 强制不调用工具
        2. requiere 强制调用一个或多个工具
        3. auto 自动调用工具
        4. 制定强制调用的工具名
    7. Pydantic
      1. Field
      2. Optional(type)
      3. default(支持有限)
      4. baseModel
      5. 限制条件(le,gt,ge等)
    8. agent
      1. model
      2. tools
      3. invoke
      4. name
      5. systemprompt
      6. response_format
        1. ProviderStrategy
        2. ToolStrategy
          1. tool_message_content 替换工具调用在对话历史中的信息,减少输入token消耗
          2. handle_erroe :
            • True
            • False
            • Str
            • callable
            • ExceptionType
        3. AutoStategy
      7. 疑问
        • 如何设置工具的重试次数和重试策略

20260816知识点复习

  1. agent.stream
    1. stream_mode
      1. values : 每次返回全量消息列表
      2. update :每次返回更新的AIMessage
      3. messages : 一点点的输出,输出AIMessageChunk
      4. task : 基于 udpate模式添加了一些任务信息
      5. debug : 基于task模式,多了一些时间戳和一些调试信息
      6. custom
  2. midware
    1. SummarizeMidware
      1. trigger
        1. fraction
        2. message
        3. token
      2. keep
      3. summary_prompt
    2. Human_in_the_loop 1.