Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Oct 19, 2022
1 parent 269d9c5 commit ccae619
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 63 deletions.
2 changes: 1 addition & 1 deletion ai/handler/ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func New() *Ai {
return &Ai{}
}

func (e *Ai) Call(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
func (e *Ai) Call(ctx context.Context, req *pb.CallRequest, rsp *pb.CallResponse) error {
if len(req.Text) == 0 {
return errors.BadRequest("ai.call", "missing text")
}
Expand Down
107 changes: 54 additions & 53 deletions ai/proto/ai.pb.go

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

12 changes: 6 additions & 6 deletions ai/proto/ai.pb.micro.go

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

6 changes: 3 additions & 3 deletions ai/proto/ai.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ package ai;
option go_package = "./proto;ai";

service Ai {
rpc Call(Request) returns (Response) {}
rpc Call(CallRequest) returns (CallResponse) {}
rpc Moderate(ModerateRequest) returns (ModerateResponse) {}
}

// Make a request to the AI
message Request {
message CallRequest {
// text to pass in
string text = 1;
}

// Response from the AI
message Response {
message CallResponse {
// text returned
string text = 2;
}
Expand Down

0 comments on commit ccae619

Please sign in to comment.