Unverified Commit e47b5b43 authored by Yeuoly's avatar Yeuoly Committed by GitHub

fix: baichuan frequency_penalty (#2446)

parent 21c9d9e2
......@@ -128,8 +128,10 @@ class BaichuanModel:
'role': message.role,
})
# [baichuan] frequency_penalty must be between 1 and 2
if 'frequency_penalty' in parameters:
if parameters['frequency_penalty'] < 1 or parameters['frequency_penalty'] > 2:
parameters['frequency_penalty'] = 1
# turbo api accepts flat parameters
return {
'model': self._model_mapping(model),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment