-
Swetha Lakshmana Murthy authoredSwetha Lakshmana Murthy authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
client.py 559 B
import grpc
import chatbot_pb2
import chatbot_pb2_grpc
def run():
with grpc.insecure_channel("localhost:8061") as channel:
stub = chatbot_pb2_grpc.ChatStub(channel)
print("🌐 Connected to gRPC server")
try:
responses = stub.requestUserQueriesToPlanner(chatbot_pb2.Empty())
for response in responses:
print(f"✅ Received user query: {response.text}")
except grpc.RpcError as e:
print(f"gRPC Error: {e.code()} - {e.details()}")
if __name__ == "__main__":
run()