Skip to content

Commit

Permalink
(feat) adding a rich assistant protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Aug 12, 2024
1 parent bc68ae6 commit 8c7b5f0
Showing 1 changed file with 51 additions and 3 deletions.
54 changes: 51 additions & 3 deletions gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,60 @@ message SnapshotLoadResult {

message ChatMessage {
// The message to create
string message = 1;
oneof request_type {
MessagePayload message = 1;
// Cancel the last message sent to openAI, includes the message and tools that were started
bool cancel = 2;
}
}

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 MessageInfo {
// An informational message, eg a cancellation notice
string info = 1;
}

message ToolProperty {
// eg "method":"LIST" or "type":"ec2-instance"
string key = 1;
string value = 2;
}

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 ChatMessageResult {
oneof response_type {
string error = 1;
string message = 2;
MessagePayload message = 1;
string error = 2;
string info = 3;
MessageToolStart toolStart = 4;
MessageToolEnd toolEnd = 5;
}
}

0 comments on commit 8c7b5f0

Please sign in to comment.