Skip to content

Commit

Permalink
Mark ElizaService.Say idempotent (#126)
Browse files Browse the repository at this point in the history
Say is free of side effects and perfectly safe to cache, so we should
mark it idempotent. This also lets us demo HTTP GETs.
  • Loading branch information
akshayjshah authored Aug 20, 2023
1 parent e8c89a0 commit b68eb35
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 33 deletions.
58 changes: 29 additions & 29 deletions internal/gen/connectrpc/eliza/v1/eliza.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion proto/connectrpc/eliza/v1/eliza.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ package connectrpc.eliza.v1;
// distributions.
service ElizaService {
// Say is a unary RPC. Eliza responds to the prompt with a single sentence.
rpc Say(SayRequest) returns (SayResponse) {}
rpc Say(SayRequest) returns (SayResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// Converse is a bidirectional RPC. The caller may exchange multiple
// back-and-forth messages with Eliza over a long-lived connection. Eliza
// responds to each ConverseRequest with a ConverseResponse.
Expand Down

0 comments on commit b68eb35

Please sign in to comment.