MCPcopy Index your code
hub / github.com/codehamr/codehamr / Chat

Method Chat

internal/llm/llm.go:286–290  ·  view source on GitHub ↗

Chat streams an assistant response on the returned channel, closing it when the stream ends. Reasoning runs at `high` effort by default; if the server rejects the tools + reasoning_effort combo (newer OpenAI models do), postChat drops reasoning_effort for this Client's lifetime so the model still wo

(parent context.Context, messages []chmctx.Message, tools []Tool)

Source from the content-addressed store, hash-verified

284// drops reasoning_effort for this Client's lifetime so the model still works,
285// with tools but no reasoning. Staying on chat-completions is the product line;
286// we do not branch to /v1/responses to keep reasoning.
287func (c *Client) Chat(parent context.Context, messages []chmctx.Message, tools []Tool) <-chan Event {
288 out := make(chan Event, 32)
289 go c.run(parent, messages, tools, out)
290 return out
291}
292
293func (c *Client) run(parent context.Context, msgs []chmctx.Message, tools []Tool, out chan<- Event) {

Calls 1

runMethod · 0.95