Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
bb7af56e
Unverified
Commit
bb7af56e
authored
Jan 03, 2024
by
takatost
Committed by
GitHub
Jan 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: zhipuai history format wrong (#1897)
parent
77f9e8ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
llm.py
api/core/model_runtime/model_providers/zhipuai/llm/llm.py
+4
-1
zhipuai.yaml
api/core/model_runtime/model_providers/zhipuai/zhipuai.yaml
+1
-1
No files found.
api/core/model_runtime/model_providers/zhipuai/llm/llm.py
View file @
bb7af56e
...
...
@@ -117,7 +117,10 @@ class ZhipuAILargeLanguageModel(_CommonZhipuaiAI, LargeLanguageModel):
params
=
{
'model'
:
model
,
'prompt'
:
[{
'role'
:
prompt_message
.
role
.
value
,
'content'
:
prompt_message
.
content
}
for
prompt_message
in
prompt_messages
],
'prompt'
:
[{
'role'
:
prompt_message
.
role
.
value
if
prompt_message
.
role
.
value
!=
'system'
else
'user'
,
'content'
:
prompt_message
.
content
}
for
prompt_message
in
prompt_messages
],
**
model_parameters
}
...
...
api/core/model_runtime/model_providers/zhipuai/zhipuai.yaml
View file @
bb7af56e
...
...
@@ -24,7 +24,7 @@ provider_credential_schema:
-
variable
:
api_key
label
:
en_US
:
APIKey
type
:
tex
t-input
type
:
secre
t-input
required
:
true
placeholder
:
zh_Hans
:
在此输入您的 APIKey
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment