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
76c52300
Unverified
Commit
76c52300
authored
Jan 24, 2024
by
takatost
Committed by
GitHub
Jan 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: abab6-chat supported (#2184)
parent
dda32c68
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
9 deletions
+41
-9
abab5-chat.yaml
...model_runtime/model_providers/minimax/llm/abab5-chat.yaml
+1
-1
abab5.5-chat.yaml
...del_runtime/model_providers/minimax/llm/abab5.5-chat.yaml
+1
-1
abab5.5s-chat.yaml
...el_runtime/model_providers/minimax/llm/abab5.5s-chat.yaml
+1
-1
abab6-chat.yaml
...model_runtime/model_providers/minimax/llm/abab6-chat.yaml
+35
-0
chat_completion_pro.py
...untime/model_providers/minimax/llm/chat_completion_pro.py
+0
-3
llm.py
api/core/model_runtime/model_providers/minimax/llm/llm.py
+3
-3
No files found.
api/core/model_runtime/model_providers/minimax/llm/abab5-chat.yaml
View file @
76c52300
...
...
@@ -23,7 +23,7 @@ parameter_rules:
-
name
:
frequency_penalty
use_template
:
frequency_penalty
pricing
:
input
:
'
0.0
0
'
input
:
'
0.0
15
'
output
:
'
0.015'
unit
:
'
0.001'
currency
:
RMB
api/core/model_runtime/model_providers/minimax/llm/abab5.5-chat.yaml
View file @
76c52300
...
...
@@ -36,7 +36,7 @@ parameter_rules:
en_US
:
Enable Web Search
zh_Hans
:
开启网页搜索
pricing
:
input
:
'
0.0
0
'
input
:
'
0.0
15
'
output
:
'
0.015'
unit
:
'
0.001'
currency
:
RMB
api/core/model_runtime/model_providers/minimax/llm/abab5.5s-chat.yaml
View file @
76c52300
...
...
@@ -29,7 +29,7 @@ parameter_rules:
-
name
:
frequency_penalty
use_template
:
frequency_penalty
pricing
:
input
:
'
0.00'
input
:
'
0.00
5
'
output
:
'
0.005'
unit
:
'
0.001'
currency
:
RMB
api/core/model_runtime/model_providers/minimax/llm/abab6-chat.yaml
0 → 100644
View file @
76c52300
model
:
abab6-chat
label
:
en_US
:
Abab6-Chat
model_type
:
llm
features
:
-
agent-thought
model_properties
:
mode
:
chat
context_size
:
32768
parameter_rules
:
-
name
:
temperature
use_template
:
temperature
min
:
0.01
max
:
1
default
:
0.1
-
name
:
top_p
use_template
:
top_p
min
:
0.01
max
:
1
default
:
0.9
-
name
:
max_tokens
use_template
:
max_tokens
required
:
true
default
:
2048
min
:
1
max
:
32768
-
name
:
presence_penalty
use_template
:
presence_penalty
-
name
:
frequency_penalty
use_template
:
frequency_penalty
pricing
:
input
:
'
0.1'
output
:
'
0.1'
unit
:
'
0.001'
currency
:
RMB
api/core/model_runtime/model_providers/minimax/llm/chat_completion_pro.py
View file @
76c52300
...
...
@@ -22,9 +22,6 @@ class MinimaxChatCompletionPro(object):
"""
generate chat completion
"""
if
model
not
in
[
'abab5.5-chat'
,
'abab5.5s-chat'
]:
raise
BadRequestError
(
f
'Invalid model: {model}'
)
if
not
api_key
or
not
group_id
:
raise
InvalidAPIKeyError
(
'Invalid API key or group ID'
)
...
...
api/core/model_runtime/model_providers/minimax/llm/llm.py
View file @
76c52300
from
typing
import
Generator
,
List
,
Optional
,
Union
from
typing
import
Generator
,
List
from
core.model_runtime.entities.llm_entities
import
LLM
Mode
,
LLMResult
,
LLMResultChunk
,
LLMResultChunkDelta
,
LLMUsage
from
core.model_runtime.entities.llm_entities
import
LLM
Result
,
LLMResultChunk
,
LLMResultChunkDelta
from
core.model_runtime.entities.message_entities
import
(
AssistantPromptMessage
,
PromptMessage
,
PromptMessageTool
,
SystemPromptMessage
,
UserPromptMessage
)
from
core.model_runtime.entities.model_entities
import
AIModelEntity
,
FetchFrom
,
ModelType
,
ParameterRule
,
ParameterType
from
core.model_runtime.errors.invoke
import
(
InvokeAuthorizationError
,
InvokeBadRequestError
,
InvokeConnectionError
,
InvokeError
,
InvokeRateLimitError
,
InvokeServerUnavailableError
)
from
core.model_runtime.errors.validate
import
CredentialsValidateFailedError
...
...
@@ -18,6 +17,7 @@ from core.model_runtime.model_providers.minimax.llm.types import MinimaxMessage
class
MinimaxLargeLanguageModel
(
LargeLanguageModel
):
model_apis
=
{
'abab6-chat'
:
MinimaxChatCompletionPro
,
'abab5.5s-chat'
:
MinimaxChatCompletionPro
,
'abab5.5-chat'
:
MinimaxChatCompletionPro
,
'abab5-chat'
:
MinimaxChatCompletion
...
...
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