-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add service definition for the
ArticleExtender
for initial qu…
…estions (#612) * add proposal for grpc service between paperboy and chatbot for initial questions for the article extender * format that shit * rename package * add go_package * mv to page.article package * rename file
- Loading branch information
1 parent
133d86f
commit ff84e4a
Showing
1 changed file
with
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
syntax = "proto3"; | ||
/** | ||
* @FileArticle ⚙︎ ArticleExtenderService | ||
*/ | ||
|
||
package stroeer.page.article.v1; | ||
|
||
option go_package = "github.com/stroeer/go-tapir/page/article/v1;article"; | ||
|
||
/** | ||
* The ArticleExtenderService provides methods to extend an article with additional information. | ||
* The main purpose is to retrieve questions for a given article to be rendered in the ArticleExtender Widget on ArticlePages. | ||
* | ||
* @CodeBlockStart protobuf | ||
*/ | ||
service ArticleExtenderService { | ||
rpc GetQuestions(GetQuestionsRequest) returns (GetQuestionsResponse) {} | ||
} | ||
/** @CodeBlockEnd */ | ||
|
||
/** | ||
* # `⚙︎ GetQuestions` | ||
* ```protobuf | ||
* rpc GetQuestions(GetQuestionsRequest) returns (GetQuestionsResponse) {} | ||
* ``` | ||
* | ||
* returns an array of questions if the given `id` exists, in the vector store, | ||
* an `Error`, otherwise. | ||
* | ||
* | Field name | Type | Description | | ||
* |------------------|---------------------|-----------------------------------------------------------------------| | ||
* | `id` | `int64` | [required] Unique id of the article, questions should be returned for.| | ||
* | ||
* @CodeBlockStart protobuf | ||
*/ | ||
|
||
message GetQuestionsRequest { | ||
int64 id = 1; | ||
} | ||
|
||
message GetQuestionsResponse { | ||
repeated string questions = 1; | ||
} |