Skip to content

Commit

Permalink
docs(grpc): fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 27, 2023
1 parent ee8bf6e commit d2adf6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions enfer_grpc/src/bin/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::io::{Cursor, Read};
use async_stream::stream;
use tokenizer::tokenizer_client::TokenizerClient;
use tokenizer::EncodeRequest;
use tokenizer::EncodeReply;

pub mod tokenizer {
tonic::include_proto!("tokenizer");
Expand Down Expand Up @@ -47,14 +48,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}).await?;
println!("model RESPONSE={:?}", response);


let response = client.init_model(()).await ;


let request = tonic::Request::new(EncodeRequest {
text: "Tonic".into(),
});

let response = client.encode(request).await?;
println!("RESPONSE={:?}", response);

Ok(())
Expand Down
1 change: 0 additions & 1 deletion enfer_grpc/src/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

println!("GreeterServer listening on {}", addr);


Server::builder()
.add_service(TokenizerServer::new(greeter))
.serve(addr)
Expand Down

0 comments on commit d2adf6d

Please sign in to comment.