nova-api/api/providers/mandrill.py
2023-10-14 01:15:59 +02:00

19 lines
444 B
Python

from .helpers import utils
ORGANIC = False
MODELS = ['llama-2-7b-chat']
async def chat_completion(**kwargs):
payload = kwargs
key = await utils.random_secret_for('mandrill')
return {
'method': 'POST',
'url': 'https://api.mandrillai.tech/v1/chat/completions',
'payload': payload,
'headers': {
'Authorization': f'Bearer {key}'
},
'provider_auth': f'mandrill>{key}'
}