forked from connectrpc/connect-query-es
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheliza.proto
117 lines (98 loc) · 3.65 KB
/
eliza.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Copyright 2021-2023 The Connect Authors
//
// 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 connectrpc.eliza.v1;
// ElizaService provides a way to talk to Eliza, a port of the DOCTOR script
// for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at
// the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the
// superficiality of human-computer communication. DOCTOR simulates a
// psychotherapist, and is commonly found as an Easter egg in emacs
// distributions.
service ElizaService {
// Say is a unary RPC. Eliza responds to the prompt with a single sentence.
rpc Say(SayRequest) returns (SayResponse) {}
// SayAgain is a unary RPC. Eliza responds to the prompt with a single sentence.
rpc SayAgain(SayRequest) returns (SayResponse) {}
// 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.
rpc Converse(stream ConverseRequest) returns (stream ConverseResponse) {}
// Introduce is a server streaming RPC. Given the caller's name, Eliza
// returns a stream of sentences to introduce itself.
rpc Introduce(IntroduceRequest) returns (stream IntroduceResponse) {}
}
// Second Service just to make sure multiple file generation works
service SecondService {
// Say is a unary RPC. Eliza responds to the prompt with a single sentence.
rpc Say(SayRequest) returns (SayResponse) {}
// 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.
rpc Converse(stream ConverseRequest) returns (stream ConverseResponse) {}
// Introduce is a server streaming RPC. Given the caller's name, Eliza
// returns a stream of sentences to introduce itself.
rpc Introduce(IntroduceRequest) returns (stream IntroduceResponse) {}
}
// SayRequest is a single-sentence request.
message SayRequest {
string sentence = 1;
}
// SayResponse is a single-sentence response.
message SayResponse {
string sentence = 1;
}
// ConverseRequest is a single sentence request sent as part of a
// back-and-forth conversation.
message ConverseRequest {
string sentence = 1;
}
// ConverseResponse is a single sentence response sent in answer to a
// ConverseRequest.
message ConverseResponse {
string sentence = 1;
}
// IntroduceRequest asks Eliza to introduce itself to the named user.
message IntroduceRequest {
string name = 1;
}
// IntroduceResponse is one sentence of Eliza's introductory monologue.
message IntroduceResponse {
string sentence = 1;
}
service Haberdasher {
rpc Work(Nothing) returns (Nothing);
}
service Slouch {
rpc Work(Nothing) returns (Nothing);
}
message Nothing {}
message CountRequest {
int64 add = 1;
}
message CountResponse {
int64 count = 1;
}
service BigIntService {
rpc Count(CountRequest) returns (CountResponse);
}
message ListRequest {
int64 page = 1;
}
message ListResponse {
int64 page = 1;
repeated string items = 2;
}
service PaginatedService {
rpc List(ListRequest) returns (ListResponse);
}