diff options
| author | Grail Finder <wohilas@gmail.com> | 2025-11-28 14:35:13 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2025-11-28 14:35:13 +0300 |
| commit | 4bd76fc7d5b69252f5391aab193a59f7ca82a38b (patch) | |
| tree | 97846b889835924f007ea9e6963b96ab45d9a73a /models/openrouter.go | |
| parent | 7b8505174488d9475ad3594cd355a08e1d2ba5a8 (diff) | |
| parent | 860160ea0e4d940eee43da8f20538293612093a5 (diff) | |
Diffstat (limited to 'models/openrouter.go')
| -rw-r--r-- | models/openrouter.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/models/openrouter.go b/models/openrouter.go index 933598e..50f26b6 100644 --- a/models/openrouter.go +++ b/models/openrouter.go @@ -31,6 +31,7 @@ type OpenRouterChatReq struct { Temperature float32 `json:"temperature"` MinP float32 `json:"min_p"` NPredict int32 `json:"max_tokens"` + Tools []Tool `json:"tools"` } func NewOpenRouterChatReq(cb ChatBody, props map[string]float32) OpenRouterChatReq { @@ -56,10 +57,11 @@ type OpenRouterChatRespNonStream struct { NativeFinishReason string `json:"native_finish_reason"` Index int `json:"index"` Message struct { - Role string `json:"role"` - Content string `json:"content"` - Refusal any `json:"refusal"` - Reasoning any `json:"reasoning"` + Role string `json:"role"` + Content string `json:"content"` + Refusal any `json:"refusal"` + Reasoning any `json:"reasoning"` + ToolCalls []ToolDeltaResp `json:"tool_calls"` } `json:"message"` } `json:"choices"` Usage struct { @@ -78,8 +80,9 @@ type OpenRouterChatResp struct { Choices []struct { Index int `json:"index"` Delta struct { - Role string `json:"role"` - Content string `json:"content"` + Role string `json:"role"` + Content string `json:"content"` + ToolCalls []ToolDeltaResp `json:"tool_calls"` } `json:"delta"` FinishReason string `json:"finish_reason"` NativeFinishReason string `json:"native_finish_reason"` |
