File size: 459 Bytes
aed88a2
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import os, sys
sys.path.append(os.getcwd())
from app import chat_completions, ChatCompletionRequest
import asyncio

async def main():
    req = ChatCompletionRequest(model='rwkv-latest', prompt='Who is the current president of France?', stream=False, max_tokens=32, temperature=0.2, include_usage=True, web_search=None, auto_web_search=True)
    res = await chat_completions(req)
    print(res)

if __name__ == '__main__':
    asyncio.run(main())