Skip to content

Commit

Permalink
post david dylan review
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Aug 12, 2024
1 parent 8c7b5f0 commit ac153f2
Showing 1 changed file with 28 additions and 41 deletions.
69 changes: 28 additions & 41 deletions gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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;
}

0 comments on commit ac153f2

Please sign in to comment.