目录
20260804 langchain知识点复习#
- ChatDeepseek
- ChatOpenAI
- init_chat_model(model= “provider:modelname”)
- config
- configuable_file
- extra_body
- kwargs
- langsmith(就简单配几个环境变量就行)
- @tool
- description
- docs_string
- parse_docstring
- args_schema
- pydantic
- baseModel
- Field
- Literal
- name_or_callable
- bind_tools
- tool_choice
- None 强制不调用工具
- requiere 强制调用一个或多个工具
- auto 自动调用工具
- 制定强制调用的工具名
- Pydantic
- Field
- Optional(type)
- default(支持有限)
- baseModel
- 限制条件(le,gt,ge等)
- agent
- model
- tools
- invoke
- name
- systemprompt
- response_format
- ProviderStrategy
- ToolStrategy
- tool_message_content 替换工具调用在对话历史中的信息,减少输入token消耗
- handle_erroe :
- True
- False
- Str
- callable
- ExceptionType
- AutoStategy
- 疑问
20260816知识点复习#
- agent.stream
- stream_mode
- values : 每次返回全量消息列表
- update :每次返回更新的AIMessage
- messages : 一点点的输出,输出AIMessageChunk
- task : 基于 udpate模式添加了一些任务信息
- debug : 基于task模式,多了一些时间戳和一些调试信息
- custom
- midware
- SummarizeMidware
- trigger
- fraction
- message
- token
- keep
- summary_prompt
- Human_in_the_loop
1.