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: update fish audio version (#3427)

Wendong-Fancd2b674e8dae
diff --git a/camel/models/fish_audio_model.py b/camel/models/fish_audio_model.py
index 0cc6d4b8b..2c75af59f 100644
--- a/camel/models/fish_audio_model.py
+++ b/camel/models/fish_audio_model.py
@@ -44,6 +44,12 @@ class FishAudioModel(BaseAudioModel):
self._url = url or os.environ.get(
"FISHAUDIO_API_BASE_URL", "https://api.fish.audio"
)
+ if self._api_key is None:
+ raise ValueError(
+ "API key is required for FishAudio. Please provide it via "
+ "the 'api_key' parameter or set the 'FISHAUDIO_API_KEY' "
+ "environment variable."
+ )
self.session = Session(apikey=self._api_key, base_url=self._url)
def text_to_speech(
diff --git a/camel/storages/vectordb_storages/qdrant.py b/camel/storages/vectordb_storages/qdrant.py
index 1efaa229c..cc9e398b7 100644
--- a/camel/storages/vectordb_storages/qdrant.py
+++ b/camel/storages/vectordb_storages/qdrant.py
@@ -14,6 +14,7 @@
import logging
from datetime import datetime
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast
+from uuid import UUID
if TYPE_CHECKING:
from qdrant_client import QdrantClient
@@ -251,7 +252,6 @@ class QdrantStorage(BaseVectorStorage):
else None,
"vector_count": collection_info.points_count,
"status": collection_info.status,
- "vectors_count": collection_info.vectors_count,
"config": collection_info.config,
}
@@ -304,7 +304,7 @@ class QdrantStorage(BaseVectorStorage):
"""
from qdrant_client.http.models import PointIdsList, UpdateStatus
- points = cast(List[Union[str, int]], ids)
+ points = cast(List[Union[int, str, UUID]], ids)
op_info = self._client.set_payload(
collection_name=self.collection_name,
@@ -376,7 +376,7 @@ class QdrantStorage(BaseVectorStorage):
op_info = self._client.delete(
collection_name=self.collection_name,
points_selector=PointIdsList(
- points=cast(List[Union[int, str]], ids)
+ points=cast(List[Union[int, str, UUID]], ids)
),
**kwargs,
)
diff --git a/pyproject.toml b/pyproject.toml
index c958c3bd5..cc4acadf5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -188,7 +188,7 @@ model_platforms = [
"reka-api>=3.0.8,<4",
"anthropic>=0.47.0,<0.50.0",
"cohere>=5.11.0,<6",
- "fish-audio-sdk>=2024.12.5,<2025",
+ "fish-audio-sdk>=1.0.0",
"ibm-watsonx-ai>=1.3.11",
]
huggingface = [
@@ -375,7 +375,7 @@ all = [
"rank-bm25>=0.2.2,<0.3",
"litellm>=1.38.1,<2",
"mistralai>=1.1.0,<2",
- "fish-audio-sdk>=2024.12.5,<2025",
+ "fish-audio-sdk>=1.0.0",
"anthropic>=0.47.0,<0.50.0",
"reka-api>=3.0.8,<4",
"redis>=5.0.6,<6",
diff --git a/test/models/test_minimax_model.py b/test/models/test_minimax_model.py
index 5f831e764..4fea6bd7c 100644
--- a/test/models/test_minimax_model.py
+++ b/test/models/test_minimax_model.py
@@ -28,11 +28,13 @@ class TestMinimaxModel:
ModelType.MINIMAX_M2_STABLE,
],
)
- def test_minimax_m2_model_create(self, model_type: ModelType):
+ def test_minimax_m2_model_create(self, model_type: ModelType, monkeypatch):
+ monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
model = MinimaxModel(model_type)
assert model.model_type == model_type
- def test_minimax_m2_model_create_with_config(self):
+ def test_minimax_m2_model_create_with_config(self, monkeypatch):
+ monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
config_dict = MinimaxConfig(
temperature=0.5,
top_p=1.0,
@@ -53,29 +55,31 @@ class TestMinimaxModel:
def test_minimax_m2_model_default_url(self, monkeypatch):
# Test default URL when no environment variable is set
- monkeypatch.delenv("MINIMAX_API_BASE_URL ", raising=False)
+ monkeypatch.delenv("MINIMAX_API_BASE_URL", raising=False)
monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
model = MinimaxModel(ModelType.MINIMAX_M2)
- assert model._url == "https://api.minimax.chat/v1"
+ assert model._url == "https://api.minimaxi.com/v1"
def test_minimax_m2_model_custom_url(self, monkeypatch):
# Test custom URL from environment variable
custom_url = "https://custom.minimax.endpoint/v1"
- monkeypatch.setenv("MINIMAX_M2_API_BASE_URL", custom_url)
- monkeypatch.setenv("MINIMAX_M2_API_KEY", "test_key")
+ monkeypatch.setenv("MINIMAX_API_BASE_URL", custom_url)
+ monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
model = MinimaxModel(ModelType.MINIMAX_M2)
assert model._url == custom_url
- def test_minimax_m2_model_extends_openai_compatible(self):
+ def test_minimax_m2_model_extends_openai_compatible(self, monkeypatch):
# Test that MinimaxModel inherits from OpenAICompatibleModel
+ monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
from camel.models.openai_compatible_model import OpenAICompatibleModel
model = MinimaxModel(ModelType.MINIMAX_M2)
assert isinstance(model, OpenAICompatibleModel)
- def test_minimax_m2_model_token_counter(self):
+ def test_minimax_m2_model_token_counter(self, monkeypatch):
+ monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
model = MinimaxModel(ModelType.MINIMAX_M2)
# Should use the default OpenAI token counter
assert model.token_counter is not None
diff --git a/uv.lock b/uv.lock
index 76ea32968..fef4cf391 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1304,8 +1304,8 @@ requires-dist = [
{ name = "ffmpeg-python", marker = "extra == 'owl'", specifier = ">=0.2.0,<0.3" },
{ name = "firecrawl-py", marker = "extra == 'all'", specifier = ">=1.0.0,<2" },
{ name = "firecrawl-py", marker = "extra == 'web-tools'", specifier = ">=1.0.0,<2" },
- { name = "fish-audio-sdk", marker = "extra == 'all'", specifier = ">=2024.12.5,<2025" },
- { name = "fish-audio-sdk", marker = "extra == 'model-platforms'", specifier = ">=2024.12.5,<2025" },
+ { name = "fish-audio-sdk", marker = "extra == 'all'", specifier = ">=1.0.0" },
+ { name = "fish-audio-sdk", marker = "extra == 'model-platforms'", specifier = ">=1.0.0" },
{ name = "flask", marker = "extra == 'all'", specifier = ">=2.0" },
{ name = "flask", marker = "extra == 'dev'", specifier = ">=2.0" },
{ name = "google-api-python-client", marker = "extra == 'all'", specifier = "==2.166.0" },