from langserve import RemoteRunnable
if __name__ == "__main__":
client = RemoteRunnable('http://localhost:8005/chain/')
print(client.invoke({'language': '德语', 'input_text': '你好帅!'}))

这段代码使用了 langserve 库中的 RemoteRunnable 类,它的主要功能是与一个运行在 http://localhost:8005/chain/ 地址的远程服务进行交互。具体来说,代码会向该远程服务发送一个包含 language(值为 “德语”)和 input_text(值为 “你好帅!”)的请求,然后打印出远程服务返回的响应结果。