Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

chore: add async support for SiliconFlow (#3573)

Wendong-Fan171161dae672
diff --git a/camel/models/siliconflow_model.py b/camel/models/siliconflow_model.py
index 29b42d1a7..eb9b69069 100644
--- a/camel/models/siliconflow_model.py
+++ b/camel/models/siliconflow_model.py
@@ -12,17 +12,11 @@
# limitations under the License.
# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. =========
import os
-from typing import Any, Dict, List, Optional, Type, Union
-
-from openai import AsyncStream
-from pydantic import BaseModel
+from typing import Any, Dict, Optional, Union
from camel.configs import SiliconFlowConfig
-from camel.messages import OpenAIMessage
from camel.models.openai_compatible_model import OpenAICompatibleModel
from camel.types import (
- ChatCompletion,
- ChatCompletionChunk,
ModelType,
)
from camel.utils import (
@@ -94,13 +88,3 @@ class SiliconFlowModel(OpenAICompatibleModel):
max_retries=max_retries,
**kwargs,
)
-
- async def _arun(
- self,
- messages: List[OpenAIMessage],
- response_format: Optional[Type[BaseModel]] = None,
- tools: Optional[List[Dict[str, Any]]] = None,
- ) -> Union[ChatCompletion, AsyncStream[ChatCompletionChunk]]:
- raise NotImplementedError(
- "SiliconFlow does not support async inference."
- )