Skip to content

Commit cd2b674

Browse files
chore: update fish audio version (#3427)
Co-authored-by: Tao Sun <[email protected]>
1 parent 7a229d0 commit cd2b674

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

camel/models/fish_audio_model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ def __init__(
4444
self._url = url or os.environ.get(
4545
"FISHAUDIO_API_BASE_URL", "https://api.fish.audio"
4646
)
47+
if self._api_key is None:
48+
raise ValueError(
49+
"API key is required for FishAudio. Please provide it via "
50+
"the 'api_key' parameter or set the 'FISHAUDIO_API_KEY' "
51+
"environment variable."
52+
)
4753
self.session = Session(apikey=self._api_key, base_url=self._url)
4854

4955
def text_to_speech(

camel/storages/vectordb_storages/qdrant.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import logging
1515
from datetime import datetime
1616
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast
17+
from uuid import UUID
1718

1819
if TYPE_CHECKING:
1920
from qdrant_client import QdrantClient
@@ -251,7 +252,6 @@ def _get_collection_info(self, collection_name: str) -> Dict[str, Any]:
251252
else None,
252253
"vector_count": collection_info.points_count,
253254
"status": collection_info.status,
254-
"vectors_count": collection_info.vectors_count,
255255
"config": collection_info.config,
256256
}
257257

@@ -304,7 +304,7 @@ def update_payload(
304304
"""
305305
from qdrant_client.http.models import PointIdsList, UpdateStatus
306306

307-
points = cast(List[Union[str, int]], ids)
307+
points = cast(List[Union[int, str, UUID]], ids)
308308

309309
op_info = self._client.set_payload(
310310
collection_name=self.collection_name,
@@ -376,7 +376,7 @@ def delete(
376376
op_info = self._client.delete(
377377
collection_name=self.collection_name,
378378
points_selector=PointIdsList(
379-
points=cast(List[Union[int, str]], ids)
379+
points=cast(List[Union[int, str, UUID]], ids)
380380
),
381381
**kwargs,
382382
)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ model_platforms = [
188188
"reka-api>=3.0.8,<4",
189189
"anthropic>=0.47.0,<0.50.0",
190190
"cohere>=5.11.0,<6",
191-
"fish-audio-sdk>=2024.12.5,<2025",
191+
"fish-audio-sdk>=1.0.0",
192192
"ibm-watsonx-ai>=1.3.11",
193193
]
194194
huggingface = [
@@ -375,7 +375,7 @@ all = [
375375
"rank-bm25>=0.2.2,<0.3",
376376
"litellm>=1.38.1,<2",
377377
"mistralai>=1.1.0,<2",
378-
"fish-audio-sdk>=2024.12.5,<2025",
378+
"fish-audio-sdk>=1.0.0",
379379
"anthropic>=0.47.0,<0.50.0",
380380
"reka-api>=3.0.8,<4",
381381
"redis>=5.0.6,<6",

test/models/test_minimax_model.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ class TestMinimaxModel:
2828
ModelType.MINIMAX_M2_STABLE,
2929
],
3030
)
31-
def test_minimax_m2_model_create(self, model_type: ModelType):
31+
def test_minimax_m2_model_create(self, model_type: ModelType, monkeypatch):
32+
monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
3233
model = MinimaxModel(model_type)
3334
assert model.model_type == model_type
3435

35-
def test_minimax_m2_model_create_with_config(self):
36+
def test_minimax_m2_model_create_with_config(self, monkeypatch):
37+
monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
3638
config_dict = MinimaxConfig(
3739
temperature=0.5,
3840
top_p=1.0,
@@ -53,29 +55,31 @@ def test_minimax_m2_model_api_keys_required(self):
5355

5456
def test_minimax_m2_model_default_url(self, monkeypatch):
5557
# Test default URL when no environment variable is set
56-
monkeypatch.delenv("MINIMAX_API_BASE_URL ", raising=False)
58+
monkeypatch.delenv("MINIMAX_API_BASE_URL", raising=False)
5759
monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
5860

5961
model = MinimaxModel(ModelType.MINIMAX_M2)
60-
assert model._url == "https://api.minimax.chat/v1"
62+
assert model._url == "https://api.minimaxi.com/v1"
6163

6264
def test_minimax_m2_model_custom_url(self, monkeypatch):
6365
# Test custom URL from environment variable
6466
custom_url = "https://custom.minimax.endpoint/v1"
65-
monkeypatch.setenv("MINIMAX_M2_API_BASE_URL", custom_url)
66-
monkeypatch.setenv("MINIMAX_M2_API_KEY", "test_key")
67+
monkeypatch.setenv("MINIMAX_API_BASE_URL", custom_url)
68+
monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
6769

6870
model = MinimaxModel(ModelType.MINIMAX_M2)
6971
assert model._url == custom_url
7072

71-
def test_minimax_m2_model_extends_openai_compatible(self):
73+
def test_minimax_m2_model_extends_openai_compatible(self, monkeypatch):
7274
# Test that MinimaxModel inherits from OpenAICompatibleModel
75+
monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
7376
from camel.models.openai_compatible_model import OpenAICompatibleModel
7477

7578
model = MinimaxModel(ModelType.MINIMAX_M2)
7679
assert isinstance(model, OpenAICompatibleModel)
7780

78-
def test_minimax_m2_model_token_counter(self):
81+
def test_minimax_m2_model_token_counter(self, monkeypatch):
82+
monkeypatch.setenv("MINIMAX_API_KEY", "test_key")
7983
model = MinimaxModel(ModelType.MINIMAX_M2)
8084
# Should use the default OpenAI token counter
8185
assert model.token_counter is not None

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)