ghostdrive1 commited on
Commit
e2e8db1
·
verified ·
1 Parent(s): 0c4dbe2

Upload folder using huggingface_hub

Browse files
src/agentscope/credential/_openai_compat.py CHANGED
@@ -23,6 +23,11 @@ class GroqCredential(OpenAICredential):
23
  )
24
  """Custom base URL for the Groq API."""
25
 
 
 
 
 
 
26
 
27
  class OpenRouterCredential(OpenAICredential):
28
  """The OpenRouter credential model."""
@@ -40,6 +45,11 @@ class OpenRouterCredential(OpenAICredential):
40
  )
41
  """Custom base URL for the OpenRouter API."""
42
 
 
 
 
 
 
43
 
44
  class NvidiaNimCredential(OpenAICredential):
45
  """The NVIDIA NIM credential model."""
@@ -56,3 +66,8 @@ class NvidiaNimCredential(OpenAICredential):
56
  description="The base URL for the NVIDIA NIM API.",
57
  )
58
  """Custom base URL for the NVIDIA NIM API."""
 
 
 
 
 
 
23
  )
24
  """Custom base URL for the Groq API."""
25
 
26
+ @classmethod
27
+ def get_chat_model_class(cls):
28
+ from ..model import GroqChatModel
29
+ return GroqChatModel
30
+
31
 
32
  class OpenRouterCredential(OpenAICredential):
33
  """The OpenRouter credential model."""
 
45
  )
46
  """Custom base URL for the OpenRouter API."""
47
 
48
+ @classmethod
49
+ def get_chat_model_class(cls):
50
+ from ..model import OpenRouterChatModel
51
+ return OpenRouterChatModel
52
+
53
 
54
  class NvidiaNimCredential(OpenAICredential):
55
  """The NVIDIA NIM credential model."""
 
66
  description="The base URL for the NVIDIA NIM API.",
67
  )
68
  """Custom base URL for the NVIDIA NIM API."""
69
+
70
+ @classmethod
71
+ def get_chat_model_class(cls):
72
+ from ..model import NvidiaNimChatModel
73
+ return NvidiaNimChatModel
src/agentscope/model/__init__.py CHANGED
@@ -14,6 +14,9 @@ from ._openai_chat import OpenAIChatModel
14
  from ._xai import XAIChatModel
15
  from ._moonshot import MoonshotChatModel
16
  from ._openai_response import OpenAIResponseModel
 
 
 
17
 
18
  __all__ = [
19
  "ChatUsage",
@@ -30,4 +33,7 @@ __all__ = [
30
  "XAIChatModel",
31
  "MoonshotChatModel",
32
  "OpenAIResponseModel",
 
 
 
33
  ]
 
14
  from ._xai import XAIChatModel
15
  from ._moonshot import MoonshotChatModel
16
  from ._openai_response import OpenAIResponseModel
17
+ from ._groq import GroqChatModel
18
+ from ._openrouter import OpenRouterChatModel
19
+ from ._nvidia_nim import NvidiaNimChatModel
20
 
21
  __all__ = [
22
  "ChatUsage",
 
33
  "XAIChatModel",
34
  "MoonshotChatModel",
35
  "OpenAIResponseModel",
36
+ "GroqChatModel",
37
+ "OpenRouterChatModel",
38
+ "NvidiaNimChatModel",
39
  ]
src/agentscope/model/_groq/__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from ._model import GroqChatModel
2
+
3
+ __all__ = ["GroqChatModel"]
src/agentscope/model/_groq/_model.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """The Groq chat model implementation."""
3
+ from typing import Literal
4
+
5
+ from .._openai_chat import OpenAIChatModel
6
+ from ...credential._openai_compat import GroqCredential
7
+
8
+
9
+ class GroqChatModel(OpenAIChatModel):
10
+ """The Groq chat model."""
11
+
12
+ type: Literal["groq_chat"] = "groq_chat"
13
+ """The type of the chat model."""
14
+
15
+ def __init__(
16
+ self,
17
+ credential: GroqCredential,
18
+ model: str,
19
+ **kwargs,
20
+ ) -> None:
21
+ """Initialize the Groq chat model."""
22
+ super().__init__(
23
+ credential=credential,
24
+ model=model,
25
+ **kwargs,
26
+ )
src/agentscope/model/_groq/_models/llama3-70b.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: llama3-70b-8192
2
+ api_type: groq_chat
3
+ description: The Meta Llama 3 70B model via Groq.
4
+ max_context: 8192
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ from ._model import NvidiaNimChatModel
2
+
3
+ __all__ = ["NvidiaNimChatModel"]
src/agentscope/model/_nvidia_nim/_model.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """The NVIDIA NIM chat model implementation."""
3
+ from typing import Literal
4
+
5
+ from .._openai_chat import OpenAIChatModel
6
+ from ...credential._openai_compat import NvidiaNimCredential
7
+
8
+
9
+ class NvidiaNimChatModel(OpenAIChatModel):
10
+ """The NVIDIA NIM chat model."""
11
+
12
+ type: Literal["nvidia_nim_chat"] = "nvidia_nim_chat"
13
+ """The type of the chat model."""
14
+
15
+ def __init__(
16
+ self,
17
+ credential: NvidiaNimCredential,
18
+ model: str,
19
+ **kwargs,
20
+ ) -> None:
21
+ """Initialize the NVIDIA NIM chat model."""
22
+ super().__init__(
23
+ credential=credential,
24
+ model=model,
25
+ **kwargs,
26
+ )
src/agentscope/model/_nvidia_nim/_models/deepseek-ai-deepseek-v4-flash.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: deepseek-ai/deepseek-v4-flash
2
+ api_type: nvidia_nim_chat
3
+ description: deepseek-v4-flash model via NVIDIA NIM.
4
+ max_context: 1000000
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/_models/deepseek-ai-deepseek-v4-pro.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: deepseek-ai/deepseek-v4-pro
2
+ api_type: nvidia_nim_chat
3
+ description: deepseek-v4-pro model via NVIDIA NIM.
4
+ max_context: 1000000
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/_models/meta-llama3-70b-instruct.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: meta/llama3-70b-instruct
2
+ api_type: nvidia_nim_chat
3
+ description: The Meta Llama 3 70B Instruct model via NVIDIA NIM.
4
+ max_context: 8192
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/_models/minimaxai-minimax-m2.7.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: minimaxai/minimax-m2.7
2
+ api_type: nvidia_nim_chat
3
+ description: minimax-m2.7 model via NVIDIA NIM.
4
+ max_context: 204800
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/_models/minimaxai-minimax-m3.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: minimaxai/minimax-m3
2
+ api_type: nvidia_nim_chat
3
+ description: minimax-m3 model via NVIDIA NIM.
4
+ max_context: 1000000
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/_models/nvidia-nemotron-3-ultra-550b-a55b.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: nvidia/nemotron-3-ultra-550b-a55b
2
+ api_type: nvidia_nim_chat
3
+ description: nemotron-3-ultra-550b-a55b model via NVIDIA NIM.
4
+ max_context: 1000000
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/_models/qwen-qwen3.5-397b-a17b.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: qwen/qwen3.5-397b-a17b
2
+ api_type: nvidia_nim_chat
3
+ description: qwen3.5-397b-a17b model via NVIDIA NIM.
4
+ max_context: 262144
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true
src/agentscope/model/_nvidia_nim/_models/stepfun-ai-step-3.7-flash.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ name: stepfun-ai/step-3.7-flash
2
+ api_type: nvidia_nim_chat
3
+ description: step-3.7-flash model via NVIDIA NIM.
4
+ max_context: 256000
5
+ support_vision: false
6
+ support_function_calling: true
7
+ support_structured_output: true