From 52533238d385f07abbcde4d279d436807cb2faa5 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Tue, 18 Mar 2025 03:45:38 -0400 Subject: [PATCH] Add getter methods for response and toolcall in Context Introduce `Response()` and `ToolCall()` methods to access the respective fields from the `Context` struct. This enhances encapsulation and provides a standardized way to retrieve these values. --- context.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/context.go b/context.go index bb5620a..8320269 100644 --- a/context.go +++ b/context.go @@ -47,6 +47,14 @@ func (c *Context) Request() Request { return c.request } +func (c *Context) Response() *ResponseChoice { + return c.response +} + +func (c *Context) ToolCall() *ToolCall { + return c.toolcall +} + func (c *Context) WithContext(ctx context.Context) *Context { return &Context{Context: ctx, request: c.request, response: c.response, toolcall: c.toolcall} }