mirror of
https://github.com/ollama/ollama.git
synced 2025-11-10 20:17:59 +01:00
* working (other than tool call is the incorrect order) for tool calls and tools * Tests work, other than image tags (tests do not go through server) and tools (not in the correct order, but contents are the same) * testing for qwen3vl parser - toolparser is working * made changes to JSON tool parser, wraps the TollCallFunction with a TollCall object * Working parser for thinking models - assumes state of thinking, emits unambiguous content in thinking, does not call tool call in thinking * changed the parser to start with collecting content * thinking prefill * add hasThinkingSupport parameter to parser * qwen3-vl -> qwen3-vl-instruct for renderer/parser * Add hasThinkingSupport=false to QwenVLParser --------- Co-authored-by: Devon Rifkin <drifkin@drifkin.net>
21 lines
422 B
Go
21 lines
422 B
Go
package renderers
|
|
|
|
import "github.com/ollama/ollama/api"
|
|
|
|
type Renderer interface {
|
|
Render(messages []api.Message, tools []api.Tool, think *api.ThinkValue) (string, error)
|
|
}
|
|
|
|
func RendererForName(name string) Renderer {
|
|
switch name {
|
|
case "qwen3-coder":
|
|
renderer := &Qwen3CoderRenderer{}
|
|
return renderer
|
|
case "qwen3-vl-instruct":
|
|
renderer := &Qwen3VLRenderer{false}
|
|
return renderer
|
|
default:
|
|
return nil
|
|
}
|
|
}
|