hypha-rpc
v0.20.39
Published
Hypha RPC client for connecting to Hypha server for data management and AI model serving.
Downloads
171
Readme
Hypha RPC
Usage
Connect to Hypha
import { hyphaWebsocketClient } from "hypha-rpc";
hyphaWebsocketClient.connectToServer({
server_url: 'https://ai.imjoy.io',
}).then(async (api)=>{
await api.register_service(
{
"id": "echo-service",
"config":{
"visibility": "public"
},
"type": "echo",
echo( data ){
console.log("Echo: ", data)
return data
}
}
)
})