Documentation
¶
Index ¶
- Constants
- func NewAgentServiceHandler(svc AgentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewChatServiceHandler(svc ChatServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type AgentServiceClient
- type AgentServiceHandler
- type ChatServiceClient
- type ChatServiceHandler
- type UnimplementedAgentServiceHandler
- func (UnimplementedAgentServiceHandler) ConfigureAgent(context.Context, *connect.Request[v1.ConfigureAgentRequest]) (*connect.Response[v1.ConfigureAgentResponse], error)
- func (UnimplementedAgentServiceHandler) GetAgentStatus(context.Context, *connect.Request[v1.GetAgentStatusRequest]) (*connect.Response[v1.GetAgentStatusResponse], error)
- type UnimplementedChatServiceHandler
- func (UnimplementedChatServiceHandler) Converse(context.Context, *connect.BidiStream[v1.ConverseRequest, v1.ConverseResponse]) error
- func (UnimplementedChatServiceHandler) GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error)
- func (UnimplementedChatServiceHandler) ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error)
- func (UnimplementedChatServiceHandler) RemoveConversation(context.Context, *connect.Request[v1.RemoveConversationRequest]) (*connect.Response[v1.RemoveConversationResponse], error)
Constants ¶
const ( // ChatServiceName is the fully-qualified name of the ChatService service. ChatServiceName = "madsrc.aigent.v1.ChatService" // AgentServiceName is the fully-qualified name of the AgentService service. AgentServiceName = "madsrc.aigent.v1.AgentService" )
const ( // ChatServiceConverseProcedure is the fully-qualified name of the ChatService's Converse RPC. ChatServiceConverseProcedure = "/madsrc.aigent.v1.ChatService/Converse" // ChatServiceListConversationsProcedure is the fully-qualified name of the ChatService's // ListConversations RPC. ChatServiceListConversationsProcedure = "/madsrc.aigent.v1.ChatService/ListConversations" // ChatServiceRemoveConversationProcedure is the fully-qualified name of the ChatService's // RemoveConversation RPC. ChatServiceRemoveConversationProcedure = "/madsrc.aigent.v1.ChatService/RemoveConversation" // ChatServiceGetConversationProcedure is the fully-qualified name of the ChatService's // GetConversation RPC. ChatServiceGetConversationProcedure = "/madsrc.aigent.v1.ChatService/GetConversation" // AgentServiceConfigureAgentProcedure is the fully-qualified name of the AgentService's // ConfigureAgent RPC. AgentServiceConfigureAgentProcedure = "/madsrc.aigent.v1.AgentService/ConfigureAgent" // AgentServiceGetAgentStatusProcedure is the fully-qualified name of the AgentService's // GetAgentStatus RPC. AgentServiceGetAgentStatusProcedure = "/madsrc.aigent.v1.AgentService/GetAgentStatus" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
Variables ¶
This section is empty.
Functions ¶
func NewAgentServiceHandler ¶
func NewAgentServiceHandler(svc AgentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewAgentServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
func NewChatServiceHandler ¶
func NewChatServiceHandler(svc ChatServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewChatServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type AgentServiceClient ¶
type AgentServiceClient interface { // ConfigureAgent allows configuring various agent parameters like log level, persona, temperature, etc. ConfigureAgent(context.Context, *connect.Request[v1.ConfigureAgentRequest]) (*connect.Response[v1.ConfigureAgentResponse], error) // GetAgentStatus retrieves the current operational status and configuration of the agent. GetAgentStatus(context.Context, *connect.Request[v1.GetAgentStatusRequest]) (*connect.Response[v1.GetAgentStatusResponse], error) }
AgentServiceClient is a client for the madsrc.aigent.v1.AgentService service.
func NewAgentServiceClient ¶
func NewAgentServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AgentServiceClient
NewAgentServiceClient constructs a client for the madsrc.aigent.v1.AgentService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type AgentServiceHandler ¶
type AgentServiceHandler interface { // ConfigureAgent allows configuring various agent parameters like log level, persona, temperature, etc. ConfigureAgent(context.Context, *connect.Request[v1.ConfigureAgentRequest]) (*connect.Response[v1.ConfigureAgentResponse], error) // GetAgentStatus retrieves the current operational status and configuration of the agent. GetAgentStatus(context.Context, *connect.Request[v1.GetAgentStatusRequest]) (*connect.Response[v1.GetAgentStatusResponse], error) }
AgentServiceHandler is an implementation of the madsrc.aigent.v1.AgentService service.
type ChatServiceClient ¶
type ChatServiceClient interface { // Converse handles the primary bidirectional communication for an interactive chat session. // This includes sending user messages, receiving streamed LLM responses, handling tool calls and approvals. Converse(context.Context) *connect.BidiStreamForClient[v1.ConverseRequest, v1.ConverseResponse] // ListConversations retrieves a list of all available conversations. ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error) // RemoveConversation deletes a specified conversation. RemoveConversation(context.Context, *connect.Request[v1.RemoveConversationRequest]) (*connect.Response[v1.RemoveConversationResponse], error) // GetConversation retrieves the details and message history of a specific conversation. GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error) }
ChatServiceClient is a client for the madsrc.aigent.v1.ChatService service.
func NewChatServiceClient ¶
func NewChatServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ChatServiceClient
NewChatServiceClient constructs a client for the madsrc.aigent.v1.ChatService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type ChatServiceHandler ¶
type ChatServiceHandler interface { // Converse handles the primary bidirectional communication for an interactive chat session. // This includes sending user messages, receiving streamed LLM responses, handling tool calls and approvals. Converse(context.Context, *connect.BidiStream[v1.ConverseRequest, v1.ConverseResponse]) error // ListConversations retrieves a list of all available conversations. ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error) // RemoveConversation deletes a specified conversation. RemoveConversation(context.Context, *connect.Request[v1.RemoveConversationRequest]) (*connect.Response[v1.RemoveConversationResponse], error) // GetConversation retrieves the details and message history of a specific conversation. GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error) }
ChatServiceHandler is an implementation of the madsrc.aigent.v1.ChatService service.
type UnimplementedAgentServiceHandler ¶
type UnimplementedAgentServiceHandler struct{}
UnimplementedAgentServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedAgentServiceHandler) ConfigureAgent ¶
func (UnimplementedAgentServiceHandler) ConfigureAgent(context.Context, *connect.Request[v1.ConfigureAgentRequest]) (*connect.Response[v1.ConfigureAgentResponse], error)
func (UnimplementedAgentServiceHandler) GetAgentStatus ¶
func (UnimplementedAgentServiceHandler) GetAgentStatus(context.Context, *connect.Request[v1.GetAgentStatusRequest]) (*connect.Response[v1.GetAgentStatusResponse], error)
type UnimplementedChatServiceHandler ¶
type UnimplementedChatServiceHandler struct{}
UnimplementedChatServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedChatServiceHandler) Converse ¶
func (UnimplementedChatServiceHandler) Converse(context.Context, *connect.BidiStream[v1.ConverseRequest, v1.ConverseResponse]) error
func (UnimplementedChatServiceHandler) GetConversation ¶
func (UnimplementedChatServiceHandler) GetConversation(context.Context, *connect.Request[v1.GetConversationRequest]) (*connect.Response[v1.GetConversationResponse], error)
func (UnimplementedChatServiceHandler) ListConversations ¶
func (UnimplementedChatServiceHandler) ListConversations(context.Context, *connect.Request[v1.ListConversationsRequest]) (*connect.Response[v1.ListConversationsResponse], error)
func (UnimplementedChatServiceHandler) RemoveConversation ¶
func (UnimplementedChatServiceHandler) RemoveConversation(context.Context, *connect.Request[v1.RemoveConversationRequest]) (*connect.Response[v1.RemoveConversationResponse], error)