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.
This commit is contained in:
		@@ -47,6 +47,14 @@ func (c *Context) Request() Request {
 | 
				
			|||||||
	return c.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 {
 | 
					func (c *Context) WithContext(ctx context.Context) *Context {
 | 
				
			||||||
	return &Context{Context: ctx, request: c.request, response: c.response, toolcall: c.toolcall}
 | 
						return &Context{Context: ctx, request: c.request, response: c.response, toolcall: c.toolcall}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user