nova-api/api/providers/mandrill.py

21 lines
473 B
Python
Raw Normal View History

2023-10-06 23:05:38 +02:00
from .helpers import utils
AUTH = True
ORGANIC = False
STREAMING = True
MODELS = ['llama-2-7b-chat']
async def chat_completion(**kwargs):
payload = kwargs
key = await utils.random_secret_for('mandrill')
return {
'method': 'POST',
2023-10-09 19:09:01 +02:00
'url': 'https://api.mandrillai.tech/v1/chat/completions',
2023-10-06 23:05:38 +02:00
'payload': payload,
'headers': {
'Authorization': f'Bearer {key}'
},
'provider_auth': f'mandrill>{key}'
}