mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-26 00:33:58 +01:00
22 lines
489 B
Python
22 lines
489 B
Python
|
from .helpers import utils
|
||
|
|
||
|
AUTH = True
|
||
|
ORGANIC = False
|
||
|
CONTEXT = True
|
||
|
STREAMING = True
|
||
|
MODELS = ['llama-2-7b-chat']
|
||
|
|
||
|
async def chat_completion(**kwargs):
|
||
|
payload = kwargs
|
||
|
key = await utils.random_secret_for('mandrill')
|
||
|
|
||
|
return {
|
||
|
'method': 'POST',
|
||
|
'url': f'https://api.mandrillai.tech/v1/chat/completions',
|
||
|
'payload': payload,
|
||
|
'headers': {
|
||
|
'Authorization': f'Bearer {key}'
|
||
|
},
|
||
|
'provider_auth': f'mandrill>{key}'
|
||
|
}
|