MCPcopy Create free account
hub / github.com/codehamr/codehamr / wireMessage

Struct wireMessage

internal/llm/llm.go:52–58  ·  view source on GitHub ↗

wireMessage is the outbound OpenAI request shape; responses parse via streamChunk. Content has no omitempty: silent bash commands (e.g. heredoc writes) yield an empty tool-result string, and omitting the field makes Ollama's /v1 shim 400 with "invalid message content type: ". Always send an ex

Source from the content-addressed store, hash-verified

50// Content has no omitempty: silent bash commands (e.g. heredoc writes) yield an
51// empty tool-result string, and omitting the field makes Ollama's /v1 shim 400
52// with "invalid message content type: <nil>". Always send an explicit string.
53type wireMessage struct {
54 Role string `json:"role"`
55 Content string `json:"content"`
56 Name string `json:"name,omitempty"` // tool name
57 ToolCallID string `json:"tool_call_id,omitempty"` // tool role
58 ToolCalls []toolCall `json:"tool_calls,omitempty"`
59}
60
61type toolCall struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected