Skip to content

Commit

Permalink
智谱API突发恶疾
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed Jan 19, 2024
1 parent 8565a35 commit f2e73aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions request_llms/com_zhipuapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def generate(self, inputs, llm_kwargs, history, system_prompt):
response = zhipuai.model_api.sse_invoke(
model=ZHIPUAI_MODEL,
prompt=generate_message_payload(inputs, llm_kwargs, history, system_prompt),
top_p=llm_kwargs['top_p'],
temperature=llm_kwargs['temperature'],
top_p=llm_kwargs['top_p']*0.7, # 智谱的API抽风,手动*0.7给做个线性变换
temperature=llm_kwargs['temperature']*0.95, # 智谱的API抽风,手动*0.7给做个线性变换
)
for event in response.events():
if event.event == "add":
Expand Down

1 comment on commit f2e73aa

@hhbb979
Copy link

@hhbb979 hhbb979 commented on f2e73aa Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提示:[Local Message] 请配置ZHIPUAI_API_KEY,我有这个KEY了,但在哪个文件里设置啊?在config_private.py里设置后,还显示Error。

Please sign in to comment.