Skip to content

Commit

Permalink
feat: add service definition for the ArticleExtender for initial qu…
Browse files Browse the repository at this point in the history
…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
harryherbig authored Dec 13, 2024
1 parent 133d86f commit ff84e4a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions stroeer/page/article/v1/article_extender_service.proto
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;
}

0 comments on commit ff84e4a

Please sign in to comment.