Skip to content

Commit 171161d

Browse files
authored
chore: add async support for SiliconFlow (#3573)
1 parent 88e6543 commit 171161d

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

camel/models/siliconflow_model.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,11 @@
1212
# limitations under the License.
1313
# ========= Copyright 2023-2025 @ CAMEL-AI.org. All Rights Reserved. =========
1414
import os
15-
from typing import Any, Dict, List, Optional, Type, Union
16-
17-
from openai import AsyncStream
18-
from pydantic import BaseModel
15+
from typing import Any, Dict, Optional, Union
1916

2017
from camel.configs import SiliconFlowConfig
21-
from camel.messages import OpenAIMessage
2218
from camel.models.openai_compatible_model import OpenAICompatibleModel
2319
from camel.types import (
24-
ChatCompletion,
25-
ChatCompletionChunk,
2620
ModelType,
2721
)
2822
from camel.utils import (
@@ -94,13 +88,3 @@ def __init__(
9488
max_retries=max_retries,
9589
**kwargs,
9690
)
97-
98-
async def _arun(
99-
self,
100-
messages: List[OpenAIMessage],
101-
response_format: Optional[Type[BaseModel]] = None,
102-
tools: Optional[List[Dict[str, Any]]] = None,
103-
) -> Union[ChatCompletion, AsyncStream[ChatCompletionChunk]]:
104-
raise NotImplementedError(
105-
"SiliconFlow does not support async inference."
106-
)

0 commit comments

Comments
 (0)