mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00

* [fix] sequence under the multiple samples * resolve the lint problems * change the parameter name * add another error code for retry * output the log for invalid response * format correction * update * update * update * update * add two model python files * update the default parameter * use random for delay * update the api example of bailing * remove the unnecessary parameter
29 lines
750 B
Python
29 lines
750 B
Python
from opencompass.models import BailingAPI
|
|
|
|
api_meta_template = dict(
|
|
round=[
|
|
dict(role='HUMAN', api_role='HUMAN'),
|
|
dict(role='BOT', api_role='BOT', generate=False),
|
|
],
|
|
reserved_roles=[dict(role='SYSTEM', api_role='SYSTEM')],
|
|
)
|
|
|
|
models = [
|
|
dict(
|
|
path='Bailing-Lite-1116',
|
|
token='', # set your key here or in environment variable BAILING_API_KEY
|
|
url='https://bailingchat.alipay.com/chat/completions',
|
|
type=BailingAPI,
|
|
meta_template=api_meta_template,
|
|
max_out_len=11264,
|
|
batch_size=1,
|
|
generation_kwargs={
|
|
'temperature': 0.01,
|
|
'top_p': 1.0,
|
|
'top_k': -1,
|
|
'n': 1,
|
|
'logprobs': 1,
|
|
},
|
|
),
|
|
]
|