-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ChatBot integration via IntellijExt
PiperOrigin-RevId: 577012210
- Loading branch information
1 parent
f56f33c
commit 3810337
Showing
5 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright 2023 The Bazel Authors. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package com.google.idea.blaze.ext; | ||
|
||
option java_package = "com.google.idea.blaze.ext"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ChatBotModelProto"; | ||
|
||
|
||
// Request message for [GenerateAnswers]. | ||
message GenerateAnswersRequest { | ||
// Specified when a message is continuing an existing session. | ||
optional string session_id = 1; | ||
|
||
// Identifies which chatbot or model to query. | ||
optional string model_id = 2; | ||
|
||
// Unformatted user prompt. | ||
optional string text = 3; | ||
} | ||
|
||
message GenerateAnswersResponse { | ||
optional Message response = 1; | ||
} | ||
|
||
message Timestamp { | ||
// Represents seconds of UTC time since Unix epoch | ||
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to | ||
// 9999-12-31T23:59:59Z inclusive. | ||
optional int64 seconds = 1; | ||
|
||
// Non-negative fractions of a second at nanosecond resolution. Negative | ||
// second values with fractions must still have non-negative nanos values | ||
// that count forward in time. Must be from 0 to 999,999,999 | ||
// inclusive. | ||
optional int32 nanos = 2; | ||
} | ||
|
||
// A chat message. | ||
message Message { | ||
// The ID of the message. | ||
optional string message_id = 1; | ||
|
||
// The ID of the session. | ||
optional string session_id = 2; | ||
|
||
// The unformatted contents of the message. | ||
optional string text = 3; | ||
|
||
// Identifies which model the message is associated with. | ||
optional string model_id = 4; | ||
|
||
optional Timestamp creation_timestamp = 5; | ||
|
||
repeated RelatedResources related_resources = 6; | ||
} | ||
|
||
message RelatedResources { | ||
// Identifies the origin url of the resource. | ||
optional string url = 1; | ||
|
||
// Identifies the title associated with the resource. | ||
optional string title = 2; | ||
} | ||
|
||
service ChatBotModel { | ||
// Returns GenerateAnswersResponse given GenerateAnswersRequest | ||
rpc GenerateAnswers(GenerateAnswersRequest) | ||
returns (GenerateAnswersResponse) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters