MCPcopy Create free account
hub / github.com/aurora-develop/aurora / AddToolMessage

Method AddToolMessage

typings/chatgpt/request.go:109–113  ·  view source on GitHub ↗

AddToolMessage 追加一个 role=tool 的消息,把客户端执行工具的结果回传给上游。 toolName 形如 "bash";result 是工具返回的字符串(可能含换行)。

(toolName, result string)

Source from the content-addressed store, hash-verified

107// AddToolMessage 追加一个 role=tool 的消息,把客户端执行工具的结果回传给上游。
108// toolName 形如 "bash";result 是工具返回的字符串(可能含换行)。
109func (c *ChatGPTRequest) AddToolMessage(toolName, result string) {
110 // 包成 "Tool (Resultado da ferramenta bash): ..." 文本格式以兼容 协议
111 text := "Tool (Resultado da ferramenta " + toolName + "): " + result
112 c.AddMessage("tool", text)
113}
114
115func isStringPart(part interface{}) bool {
116 _, ok := part.(string)

Callers 1

ConvertAPIRequestFunction · 0.95

Calls 1

AddMessageMethod · 0.95

Tested by

no test coverage detected