Hhh / tests /run_local_exec.py
Ksjsjjdj's picture
Upload 34 files
b219d99 verified
import asyncio
import os
os.environ['MODELSCOPE_ENVIRONMENT'] = ''
from app import chat_completions, ChatCompletionRequest
async def run_once():
req = ChatCompletionRequest(model='rwkv-latest', prompt='Who is the president of France today?', stream=False, max_tokens=32, temperature=0.2, include_usage=True)
res = await chat_completions(req)
print(res)
if __name__ == '__main__':
asyncio.run(run_once())