From 85a28874aacf14dd215eb6b3212c7307adacbb43 Mon Sep 17 00:00:00 2001 From: Yi Ding Date: Fri, 27 Sep 2024 11:56:57 +0800 Subject: [PATCH] [BUG]: Fix Bailing API configs (#1570) --- opencompass/models/bailing_api_oc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencompass/models/bailing_api_oc.py b/opencompass/models/bailing_api_oc.py index d4368a363..8e107556c 100644 --- a/opencompass/models/bailing_api_oc.py +++ b/opencompass/models/bailing_api_oc.py @@ -77,6 +77,9 @@ def __init__( self._headers = {'Authorization': f'Bearer {token}'} else: raise RuntimeError('There is not valid token.') + else: + self._headers = {'Authorization': f'Bearer {token}'} + self._headers['Content-Type'] = 'application/json' self._url = url if url else \ 'https://bailingchat.alipay.com/chat/completions'