Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

api: add stringifier for `Tool` (#5891)

Jeffrey Morgan46e6327e0f85
diff --git a/api/types.go b/api/types.go
index 35121813f..ea5161ff6 100644
--- a/api/types.go
+++ b/api/types.go
@@ -114,6 +114,11 @@ func (t Tools) String() string {
return string(bts)
}
+func (t Tool) String() string {
+ bts, _ := json.Marshal(t)
+ return string(bts)
+}
+
// Message is a single message in a chat sequence. The message contains the
// role ("system", "user", or "assistant"), the content and an optional list
// of images.