diff --git a/gateway.proto b/gateway.proto index 027aaf7..d21647b 100644 --- a/gateway.proto +++ b/gateway.proto @@ -92,7 +92,9 @@ message GatewayResponse { QueryStatus queryStatus = 17; // Status of requested queries - ChatMessageResult chatMessageResult = 18; + ChatResponse chatResponse = 18; + ToolCall toolCall = 19; + ToolResponse toolResponse = 20; } } @@ -212,59 +214,44 @@ message SnapshotLoadResult { message ChatMessage { // The message to create oneof request_type { - MessagePayload message = 1; + string text = 1; // Cancel the last message sent to openAI, includes the message and tools that were started bool cancel = 2; } + // attachments can be added here } -message MessagePayload { - // The text to send - string text = 1; - // this can be expanded to add in attachments, etc -} - -message MessageError { - // If an error has occured with openAI - string error = 1; +message ToolMetaData { + // The toolID from openAI + string id = 1; } -message MessageInfo { - // An informational message, eg a cancellation notice - string info = 1; +message QueryToolCall { + string type = 1; + string method = 2; + string id = 3; + string scope = 4; } -message ToolProperty { - // eg "method":"LIST" or "type":"ec2-instance" - string key = 1; - string value = 2; +message QueryToolResponse { + int32 numberItems = 1; } -message MessageToolStart { - // The toolID from openAI - string toolCallID = 1; - // The tool name, eg query - string tool = 2; - // array of key value pairs - repeated ToolProperty properties = 3; - -} - -message MessageToolEnd { - // The toolID from openAI - string toolCallID = 1; - // the raw string output passed to openAI - string output = 2; - // the error message from the tool - string error = 3; +message ToolCall { + ToolMetaData metaData = 1; + oneof call_type { + QueryToolCall query = 2; + } } -message ChatMessageResult { +message ToolResponse { + ToolMetaData metaData = 1; oneof response_type { - MessagePayload message = 1; - string error = 2; - string info = 3; - MessageToolStart toolStart = 4; - MessageToolEnd toolEnd = 5; + QueryToolResponse query =2; } } + +message ChatResponse { + string text = 1; + string error = 2; +}