File size: 438 Bytes
b219d99 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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())
|