This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import random | |
from hypha_rpc.utils.serve import create_openai_chat_server | |
async def text_generator(request: dict): | |
max_tokens = request.get("max_tokens", 50) | |
words = [ | |
"hello", | |
"world", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const serverUrl = "https://hypha.aicell.io" | |
const loginCallback = (context) => { | |
window.open(context.login_url); | |
}; | |
async function startServer(serverUrl) { | |
// Log in and connect to the Hypha server | |
const token = await hyphaWebsocketClient.login({ |
OlderNewer