MetaProvider#
- class langchain_community.chat_models.oci_generative_ai.MetaProvider[source]#
属性
stop_sequence_key
方法
__init__
()chat_generation_info
(response)chat_response_to_text
(response)chat_stream_generation_info
(event_data)chat_stream_to_text
(event_data)convert_to_oci_tool
(tool)get_role
(message)is_chat_stream_end
(event_data)messages_to_oci_params
(messages, **kwargs)将LangChain消息转换为OCI聊天参数。
- chat_generation_info(response: Any) Dict[str, Any] [source]#
- Parameters:
响应 (任意类型)
- Return type:
Dict[str, Any]
- chat_stream_generation_info(event_data: Dict) Dict[str, Any] [来源]#
- Parameters:
event_data (字典)
- Return type:
Dict[str, Any]
- convert_to_oci_tool(tool: Dict[str, Any] | Type[BaseModel] | Callable | BaseTool) Dict[str, Any] [source]#
- Parameters:
工具 (字典[字符串, 任意类型] | 类型[基础模型] | 可调用对象 | 基础工具)
- Return type:
Dict[str, Any]
- get_role(message: BaseMessage) str [来源]#
- Parameters:
消息 (BaseMessage)
- Return type:
字符串
- messages_to_oci_params(messages: List[BaseMessage], **kwargs: Any) Dict[str, Any] [source]#
将LangChain消息转换为OCI聊天参数。
- Parameters:
messages (List[BaseMessage]) – LangChain BaseMessage 对象的列表
**kwargs (Any) – 额外的关键字参数
- Returns:
包含OCI聊天参数的字典
- Raises:
ValueError – 如果消息内容无效
- Return type:
Dict[str, Any]