diff --git a/README.md b/README.md index 5b0b344..97a88fc 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,9 @@ pip install agent-server-sdk Use the **builder pattern** with `Agent` and `AgentSession`. The SDK auto-generates all required tokens: ```python -from agent import AgentClient, Area -from agent.agentkit import Agent, expires_in_hours -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent, expires_in_hours +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT client = AgentClient( area=Area.CN, @@ -104,8 +104,8 @@ client.stop_agent(agent_session_id) Generate tokens yourself and pass them in — useful when inspecting or reusing tokens: ```python -from agent import AgentClient, Area -from agent.agentkit.token import generate_convo_ai_token, expires_in_hours +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit.token import generate_convo_ai_token, expires_in_hours APP_ID = "your-app-id" APP_CERT = "your-app-certificate" @@ -153,8 +153,8 @@ A full reference for this library is available [here](https://github.com/Shengwa Instantiate and use the client with the following: ```python -from agent import AgentClient, MicrosoftTtsParams, Tts_Microsoft -from agent.agents import ( +from shengwang_agent import AgentClient, MicrosoftTtsParams, Tts_Microsoft +from shengwang_agent.agents import ( StartAgentsRequestProperties, StartAgentsRequestPropertiesAsr, StartAgentsRequestPropertiesLlm, @@ -206,8 +206,8 @@ The SDK also exports an `async` client so that you can make non-blocking calls t ```python import asyncio -from agent import AsyncAgentClient, MicrosoftTtsParams, Tts_Microsoft -from agent.agents import ( +from shengwang_agent import AsyncAgentClient, MicrosoftTtsParams, Tts_Microsoft +from shengwang_agent.agents import ( StartAgentsRequestProperties, StartAgentsRequestPropertiesAsr, StartAgentsRequestPropertiesLlm, @@ -264,7 +264,7 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass will be thrown. ```python -from agent.core.api_error import ApiError +from shengwang_agent.core.api_error import ApiError try: client.agents.start(...) @@ -278,7 +278,7 @@ except ApiError as e: Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object. ```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -312,7 +312,7 @@ The SDK provides access to raw response data, including headers, through the `.w The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes. ```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( ..., @@ -356,7 +356,7 @@ The SDK defaults to a 60 second timeout. You can configure this with a timeout o ```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( ..., @@ -377,7 +377,7 @@ and transports. ```python import httpx -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( ..., diff --git a/docs/concepts/agent.md b/docs/concepts/agent.md index f082fb8..cd53187 100644 --- a/docs/concepts/agent.md +++ b/docs/concepts/agent.md @@ -11,7 +11,7 @@ The `Agent` class is a fluent builder for configuring AI agent properties. It co ## Constructor ```python -from agent.agentkit import Agent +from shengwang_agent.agentkit import Agent agent = Agent( name='support-assistant', @@ -73,8 +73,8 @@ Each `with_*` method returns a **new** `Agent` instance — the original is unch ## Chaining Example ```python -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT agent = ( Agent(name='my-agent', instructions='你是一个智能助手。') @@ -89,9 +89,9 @@ agent = ( Because each `with_*` call returns a new `Agent`, you can build a base configuration and create multiple sessions from it: ```python -from agent import AgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT client = AgentClient(area=Area.CN, app_id='your-app-id', app_certificate='your-app-certificate') diff --git a/docs/concepts/architecture.md b/docs/concepts/architecture.md index 002754f..b1350ff 100644 --- a/docs/concepts/architecture.md +++ b/docs/concepts/architecture.md @@ -86,18 +86,18 @@ The `Agent` builder class is the same for both — it does not make HTTP calls, ```python # Top-level client and types -from agent import AgentClient, AsyncAgentClient, Area, Pool +from shengwang_agent import AgentClient, AsyncAgentClient, Area, Pool # Agentkit layer -from agent.agentkit import Agent, AgentSession -from agent.agentkit.agent_session import AsyncAgentSession +from shengwang_agent.agentkit import Agent, AgentSession +from shengwang_agent.agentkit.agent_session import AsyncAgentSession # Vendor classes -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT # Token helpers -from agent.agentkit.token import generate_rtc_token +from shengwang_agent.agentkit.token import generate_rtc_token # Also available from top-level -from agent import Agent, AgentSession, AsyncAgentSession, generate_rtc_token +from shengwang_agent import Agent, AgentSession, AsyncAgentSession, generate_rtc_token ``` diff --git a/docs/concepts/session.md b/docs/concepts/session.md index 7c2756b..a4cc9b7 100644 --- a/docs/concepts/session.md +++ b/docs/concepts/session.md @@ -34,9 +34,9 @@ You can check the current state with `session.status`. Use `Agent.create_session()` to create a session: ```python -from agent import AgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT client = AgentClient(area=Area.CN, app_id='your-app-id', app_certificate='your-app-certificate') diff --git a/docs/concepts/vendors.md b/docs/concepts/vendors.md index 43e42f4..8521e3a 100644 --- a/docs/concepts/vendors.md +++ b/docs/concepts/vendors.md @@ -11,7 +11,7 @@ The SDK provides typed vendor classes for every supported provider. Each vendor All vendor classes are available from `agent.agentkit.vendors`: ```python -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT ``` ## LLM Vendors @@ -27,7 +27,7 @@ Used with `agent.with_llm()` for the cascading flow (ASR → LLM → TTS). | `CustomLLM` | Custom endpoint | `api_key` | ```python -from agent.agentkit.vendors import AliyunLLM +from shengwang_agent.agentkit.vendors import AliyunLLM llm = AliyunLLM(api_key='your-aliyun-key', model='qwen-max') ``` @@ -47,7 +47,7 @@ Used with `agent.with_tts()`. Each TTS vendor produces audio at a specific sampl | `StepFunTTS` | StepFun | `key` | ```python -from agent.agentkit.vendors import MiniMaxTTS +from shengwang_agent.agentkit.vendors import MiniMaxTTS tts = MiniMaxTTS(key='your-minimax-key', voice_id='your-voice-id') ``` @@ -66,7 +66,7 @@ Used with `agent.with_stt()`. | `XfyunDialectSTT` | Xfyun Dialect | `app_id`, `api_key` | ```python -from agent.agentkit.vendors import FengmingSTT +from shengwang_agent.agentkit.vendors import FengmingSTT stt = FengmingSTT(language='zh-CN') ``` @@ -80,7 +80,7 @@ Used with `agent.with_avatar()`. Avatars require specific TTS sample rates — s | `SensetimeAvatar` | Sensetime | `api_key`, `agora_uid` | ```python -from agent.agentkit.vendors import SensetimeAvatar +from shengwang_agent.agentkit.vendors import SensetimeAvatar avatar = SensetimeAvatar(api_key='your-sensetime-key', agora_uid='2') ``` diff --git a/docs/getting-started/authentication.md b/docs/getting-started/authentication.md index 3e4e5b9..c31b840 100644 --- a/docs/getting-started/authentication.md +++ b/docs/getting-started/authentication.md @@ -15,7 +15,7 @@ Pass your App ID and App Certificate. The SDK generates a fresh ConvoAI token (c ### Sync ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.CN, @@ -27,7 +27,7 @@ client = AgentClient( ### Async ```python -from agent import AsyncAgentClient, Area +from shengwang_agent import AsyncAgentClient, Area client = AsyncAgentClient( area=Area.CN, @@ -43,7 +43,7 @@ Use your customer ID and customer secret. The SDK sends `Authorization: Basic ba ### Sync ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.CN, @@ -57,7 +57,7 @@ client = AgentClient( ### Async ```python -from agent import AsyncAgentClient, Area +from shengwang_agent import AsyncAgentClient, Area client = AsyncAgentClient( area=Area.CN, @@ -73,8 +73,8 @@ client = AsyncAgentClient( Pass a manually generated `agora token=...` string via `auth_token`. Use this for debugging or when you want to control the REST API token lifecycle yourself: ```python -from agent import AgentClient, Area -from agent.agentkit.token import generate_convo_ai_token +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit.token import generate_convo_ai_token raw_token = generate_convo_ai_token( app_id='your-app-id', @@ -104,7 +104,7 @@ client = AgentClient( For advanced use cases you can generate tokens directly: ```python -from agent.agentkit.token import generate_rtc_token, generate_convo_ai_token +from shengwang_agent.agentkit.token import generate_rtc_token, generate_convo_ai_token # RTC-only token (for channel join) rtc_token = generate_rtc_token( @@ -153,7 +153,7 @@ auth_header = f'agora token={convo_token}' When the SDK auto-generates a token (app credentials mode, or session without a pre-built `token`), the default lifetime is **86400 seconds (24 hours)**. You can customise this via `expires_in` on `create_session()`: ```python -from agent.agentkit import expires_in_hours, expires_in_minutes +from shengwang_agent.agentkit import expires_in_hours, expires_in_minutes session = agent.create_session( client, diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 614a808..bd78077 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -41,10 +41,10 @@ The SDK supports both synchronous and asynchronous usage: ```python # Sync -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area # Async -from agent import AsyncAgentClient, AsyncAgentSession, Area +from shengwang_agent import AsyncAgentClient, AsyncAgentSession, Area ``` Both clients share the same constructor parameters and capabilities. See [Authentication](./authentication.md) for setup details. diff --git a/docs/getting-started/quick-start.md b/docs/getting-started/quick-start.md index cea0c54..12e7b6e 100644 --- a/docs/getting-started/quick-start.md +++ b/docs/getting-started/quick-start.md @@ -13,9 +13,9 @@ This guide walks you through building a voice agent using the cascading flow (AS This complete script creates an agent with Aliyun for the LLM, MiniMax for TTS, and Fengming for STT: ```python -from agent import AgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT # 1. Create a client with app credentials client = AgentClient( @@ -56,9 +56,9 @@ For async applications, use `AsyncAgentClient` for the client. All session metho ```python import asyncio -from agent import AsyncAgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AsyncAgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT async def main(): # 1. Create an async client diff --git a/docs/guides/advanced.md b/docs/guides/advanced.md index 85ac78b..ec6cfe2 100644 --- a/docs/guides/advanced.md +++ b/docs/guides/advanced.md @@ -11,7 +11,7 @@ description: Debug logging, raw response data, retries, timeouts, and custom htt Enable HTTP request/response logging by passing `debug=True` when creating the client. This logs each request (method, URL, headers, body preview) and response (status, headers) before and after it is sent. Authorization headers are redacted. ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.US, @@ -38,7 +38,7 @@ logging.getLogger("agent").setLevel(logging.DEBUG) Use `.with_raw_response` to get a client that returns raw responses with `.headers` and `.data`: ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.US, @@ -86,7 +86,7 @@ Pass a custom `httpx.Client` or `httpx.AsyncClient` for proxies, custom transpor ```python import httpx -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.US, diff --git a/docs/guides/agent-builder-features.md b/docs/guides/agent-builder-features.md index 75a778d..b9e2447 100644 --- a/docs/guides/agent-builder-features.md +++ b/docs/guides/agent-builder-features.md @@ -29,9 +29,9 @@ For string values with a finite set of options (e.g. `data_channel`, `sal_mode`, SAL helps the agent focus on the primary speaker and suppress background noise. Enable it via `advanced_features` and configure with `with_sal`: ```python -from agent import AgentClient, Area -from agent.agentkit import Agent, AdvancedFeatures, SalConfig, SalModeValues -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent, AdvancedFeatures, SalConfig, SalModeValues +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT agent = ( Agent( @@ -56,7 +56,7 @@ Use `SalModeValues.LOCKING` or `SalModeValues.RECOGNITION` for type safety. Enable MLLM, RTM, SAL, or tools: ```python -from agent.agentkit import Agent, AdvancedFeatures +from shengwang_agent.agentkit import Agent, AdvancedFeatures # RTM signaling for custom data delivery agent = Agent(advanced_features=AdvancedFeatures(enable_rtm=True)) @@ -70,7 +70,7 @@ agent = Agent(advanced_features=AdvancedFeatures(enable_tools=True)) Configure silence handling, farewell behavior, and data channel: ```python -from agent.agentkit import ( +from shengwang_agent.agentkit import ( Agent, SessionParams, SilenceConfig, @@ -129,7 +129,7 @@ agent = ( Restrict which geographic regions the backend can use: ```python -from agent.agentkit import Agent, GeofenceConfig, GeofenceArea, GeofenceExcludeArea +from shengwang_agent.agentkit import Agent, GeofenceConfig, GeofenceArea, GeofenceExcludeArea agent = ( Agent() @@ -174,7 +174,7 @@ agent = ( Configure RTC media encryption: ```python -from agent.agentkit import Agent, RtcConfig +from shengwang_agent.agentkit import Agent, RtcConfig agent = ( Agent() @@ -193,7 +193,7 @@ agent = ( Play filler words while waiting for the LLM response: ```python -from agent.agentkit import ( +from shengwang_agent.agentkit import ( Agent, FillerWordsConfig, FillerWordsTrigger, @@ -230,7 +230,7 @@ agent = ( Read back configuration via properties: ```python -from agent.agentkit import Agent, GeofenceConfig, GeofenceArea +from shengwang_agent.agentkit import Agent, GeofenceConfig, GeofenceArea agent = ( Agent(max_history=20) @@ -254,8 +254,8 @@ agent.config # Full read-only snapshot ## Chaining All Features ```python -from agent import AgentClient, Area -from agent.agentkit import ( +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import ( Agent, AdvancedFeatures, SessionParams, @@ -272,7 +272,7 @@ from agent.agentkit import ( DataChannel, FillerWordsSelectionRule, ) -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT client = AgentClient( area=Area.CN, diff --git a/docs/guides/avatars.md b/docs/guides/avatars.md index cd84f2d..71d8f7f 100644 --- a/docs/guides/avatars.md +++ b/docs/guides/avatars.md @@ -27,9 +27,9 @@ Additionally, if the TTS `sample_rate` is not explicitly set (returns `None`), t ## Sensetime Avatar ```python -from agent import AgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT, SensetimeAvatar +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT, SensetimeAvatar client = AgentClient( area=Area.CN, diff --git a/docs/guides/cascading-flow.md b/docs/guides/cascading-flow.md index 6dbaa4e..89e9b29 100644 --- a/docs/guides/cascading-flow.md +++ b/docs/guides/cascading-flow.md @@ -17,9 +17,9 @@ User audio → STT → LLM → TTS → Agent audio ### Sync ```python -from agent import AgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT client = AgentClient( area=Area.CN, @@ -45,9 +45,9 @@ session.stop() ```python import asyncio -from agent import AsyncAgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT +from shengwang_agent import AsyncAgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT async def main(): client = AsyncAgentClient( @@ -77,9 +77,9 @@ asyncio.run(main()) This combination uses DeepSeek for LLM and Microsoft Azure for speech services: ```python -from agent import AgentClient, Area -from agent.agentkit import Agent -from agent.agentkit.vendors import DeepSeekLLM, MicrosoftTTS, MicrosoftSTT +from shengwang_agent import AgentClient, Area +from shengwang_agent.agentkit import Agent +from shengwang_agent.agentkit.vendors import DeepSeekLLM, MicrosoftTTS, MicrosoftSTT client = AgentClient( area=Area.CN, @@ -117,7 +117,7 @@ session.stop() All LLM vendors support optional parameters for fine-tuning: ```python -from agent.agentkit.vendors import AliyunLLM +from shengwang_agent.agentkit.vendors import AliyunLLM llm = AliyunLLM( api_key='your-aliyun-key', diff --git a/docs/guides/error-handling.md b/docs/guides/error-handling.md index 7377e4a..50cf1f6 100644 --- a/docs/guides/error-handling.md +++ b/docs/guides/error-handling.md @@ -9,7 +9,7 @@ description: Handle API errors with ApiError and subclasses. When the API returns a non-success status code (4xx or 5xx response), a subclass of `ApiError` is raised. ```python -from agent.core.api_error import ApiError +from shengwang_agent.core.api_error import ApiError try: client.agents.start(...) diff --git a/docs/guides/low-level-api.md b/docs/guides/low-level-api.md index 1e02003..95b9673 100644 --- a/docs/guides/low-level-api.md +++ b/docs/guides/low-level-api.md @@ -11,8 +11,8 @@ For full control over request payloads you can call the generated clients direct ## Cascading flow (ASR → LLM → TTS) ```python -from agent import AgentClient, Area -from agent.agents import ( +from shengwang_agent import AgentClient, Area +from shengwang_agent.agents import ( StartAgentsRequestProperties, StartAgentsRequestPropertiesAsr, StartAgentsRequestPropertiesLlm, @@ -55,8 +55,8 @@ client.agents.start( ```python import asyncio -from agent import Area, AsyncAgentClient -from agent.agents import ( +from shengwang_agent import Area, AsyncAgentClient +from shengwang_agent.agents import ( StartAgentsRequestProperties, StartAgentsRequestPropertiesAsr, StartAgentsRequestPropertiesLlm, diff --git a/docs/guides/mllm-flow.md b/docs/guides/mllm-flow.md index 3269cac..9f302a4 100644 --- a/docs/guides/mllm-flow.md +++ b/docs/guides/mllm-flow.md @@ -15,7 +15,7 @@ The MLLM (Multimodal LLM) flow uses a single model to handle both audio input an MLLM mode must be explicitly enabled via `advanced_features`: ```python -from agent.agentkit import Agent, AdvancedFeatures +from shengwang_agent.agentkit import Agent, AdvancedFeatures agent = Agent( name='realtime-agent', diff --git a/docs/guides/pagination.md b/docs/guides/pagination.md index 96614ef..ca19798 100644 --- a/docs/guides/pagination.md +++ b/docs/guides/pagination.md @@ -9,7 +9,7 @@ description: Iterate over paginated list endpoints. Paginated requests return a `SyncPager` or `AsyncPager` that you can iterate over. ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.CN, diff --git a/docs/guides/regional-routing.md b/docs/guides/regional-routing.md index 0c69291..8d7b32e 100644 --- a/docs/guides/regional-routing.md +++ b/docs/guides/regional-routing.md @@ -13,7 +13,7 @@ The `AgentClient` and `AsyncAgentClient` clients include a built-in domain pool When you create a client, you specify an `Area` that determines the pool of regional endpoints: ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient(area=Area.CN, app_id='your-app-id', app_certificate='your-app-certificate') ``` @@ -41,7 +41,7 @@ The `Pool` manages region prefixes and domain suffixes: `select_best_domain()` is a regular method on the sync client: ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient(area=Area.CN, app_id='your-app-id', app_certificate='your-app-certificate') @@ -57,7 +57,7 @@ On `AsyncAgentClient`, `select_best_domain()` is a **coroutine** — you must ca ```python import asyncio -from agent import AsyncAgentClient, Area +from shengwang_agent import AsyncAgentClient, Area async def main(): client = AsyncAgentClient(area=Area.CN, app_id='your-app-id', app_certificate='your-app-certificate') @@ -85,7 +85,7 @@ await client.select_best_domain() If a request fails, cycle to the next region prefix: ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient(area=Area.CN, app_id='your-app-id', app_certificate='your-app-certificate') diff --git a/docs/reference/agent.md b/docs/reference/agent.md index 8c6709d..b622bbb 100644 --- a/docs/reference/agent.md +++ b/docs/reference/agent.md @@ -6,7 +6,7 @@ description: Full API reference for the Python Agent builder class. # Agent Reference -**Import:** `from agent.agentkit import Agent` or `from agent import Agent` +**Import:** `from shengwang_agent.agentkit import Agent` or `from shengwang_agent import Agent` ## Constructor @@ -53,7 +53,7 @@ All builder methods return a new `Agent` instance (immutable pattern). Set the LLM vendor for cascading flow. ```python -from agent.agentkit.vendors import AliyunLLM +from shengwang_agent.agentkit.vendors import AliyunLLM agent = Agent().with_llm(AliyunLLM(api_key='your-key', model='qwen-max')) ``` @@ -62,7 +62,7 @@ agent = Agent().with_llm(AliyunLLM(api_key='your-key', model='qwen-max')) Set the TTS vendor. Records the vendor's `sample_rate` for avatar validation. ```python -from agent.agentkit.vendors import MiniMaxTTS +from shengwang_agent.agentkit.vendors import MiniMaxTTS agent = Agent().with_tts(MiniMaxTTS(key='your-key', voice_id='your-voice-id')) ``` @@ -71,7 +71,7 @@ agent = Agent().with_tts(MiniMaxTTS(key='your-key', voice_id='your-voice-id')) Set the STT (ASR) vendor. ```python -from agent.agentkit.vendors import FengmingSTT +from shengwang_agent.agentkit.vendors import FengmingSTT agent = Agent().with_stt(FengmingSTT(language='zh-CN')) ``` @@ -80,7 +80,7 @@ agent = Agent().with_stt(FengmingSTT(language='zh-CN')) Set the MLLM vendor for multimodal flow. Requires `AdvancedFeatures(enable_mllm=True)`. ```python -from agent.agentkit import AdvancedFeatures +from shengwang_agent.agentkit import AdvancedFeatures agent = Agent(advanced_features=AdvancedFeatures(enable_mllm=True)).with_mllm(...) ``` @@ -89,7 +89,7 @@ agent = Agent(advanced_features=AdvancedFeatures(enable_mllm=True)).with_mllm(.. Set the avatar vendor. Raises `ValueError` if TTS sample rate does not match the avatar's `required_sample_rate`. ```python -from agent.agentkit.vendors import SensetimeAvatar +from shengwang_agent.agentkit.vendors import SensetimeAvatar agent = agent.with_avatar(SensetimeAvatar(api_key='your-key', agora_uid='2')) ``` diff --git a/docs/reference/client.md b/docs/reference/client.md index 781e936..054a286 100644 --- a/docs/reference/client.md +++ b/docs/reference/client.md @@ -9,7 +9,7 @@ description: Constructor options and public methods for the AgentClient Python c ## `AgentClient` Constructor ```python -from agent import AgentClient, Area +from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.CN, @@ -42,7 +42,7 @@ Identical to `AgentClient` except: | `httpx_client` | Accepts `httpx.AsyncClient` instead of `httpx.Client` | ```python -from agent import AsyncAgentClient, Area +from shengwang_agent import AsyncAgentClient, Area client = AsyncAgentClient( area=Area.CN, diff --git a/docs/reference/session.md b/docs/reference/session.md index 18a51cf..f934681 100644 --- a/docs/reference/session.md +++ b/docs/reference/session.md @@ -8,10 +8,10 @@ description: Full API reference for the Python AgentSession class. **Import:** ```python -from agent.agentkit import AgentSession -from agent.agentkit.agent_session import AsyncAgentSession +from shengwang_agent.agentkit import AgentSession +from shengwang_agent.agentkit.agent_session import AsyncAgentSession # or from top-level: -from agent import AgentSession, AsyncAgentSession +from shengwang_agent import AgentSession, AsyncAgentSession ``` ## Constructor @@ -138,7 +138,7 @@ Update the agent configuration at runtime. | **Raises** | `RuntimeError` if not in `running` state | Same | ```python -from agent.agents.types import UpdateAgentsRequestProperties +from shengwang_agent.agents.types import UpdateAgentsRequestProperties # Sync session.update(properties) diff --git a/docs/reference/vendors.md b/docs/reference/vendors.md index 0853594..8ef66a7 100644 --- a/docs/reference/vendors.md +++ b/docs/reference/vendors.md @@ -9,7 +9,7 @@ description: Constructor options for all LLM, TTS, STT, and Avatar vendor classe All vendor classes are available from `agent.agentkit.vendors`: ```python -from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT, SensetimeAvatar +from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT, SensetimeAvatar ``` --- @@ -33,7 +33,7 @@ from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT, Sensetime | `params` | `Dict[str, Any]` | No | `None` | Additional model parameters | ```python -from agent.agentkit.vendors import AliyunLLM +from shengwang_agent.agentkit.vendors import AliyunLLM llm = AliyunLLM(api_key='your-key', model='qwen-max') ``` @@ -54,7 +54,7 @@ llm = AliyunLLM(api_key='your-key', model='qwen-max') | `input_modalities` | `List[str]` | No | `None` | Input modalities | ```python -from agent.agentkit.vendors import BytedanceLLM +from shengwang_agent.agentkit.vendors import BytedanceLLM llm = BytedanceLLM(api_key='your-key', model='doubao-pro') ``` @@ -74,7 +74,7 @@ llm = BytedanceLLM(api_key='your-key', model='doubao-pro') | `input_modalities` | `List[str]` | No | `None` | Input modalities | ```python -from agent.agentkit.vendors import DeepSeekLLM +from shengwang_agent.agentkit.vendors import DeepSeekLLM llm = DeepSeekLLM(api_key='your-key', model='deepseek-chat') ``` @@ -94,7 +94,7 @@ llm = DeepSeekLLM(api_key='your-key', model='deepseek-chat') | `input_modalities` | `List[str]` | No | `None` | Input modalities | ```python -from agent.agentkit.vendors import TencentLLM +from shengwang_agent.agentkit.vendors import TencentLLM llm = TencentLLM(api_key='your-key', model='hunyuan-pro') ``` @@ -114,7 +114,7 @@ llm = TencentLLM(api_key='your-key', model='hunyuan-pro') | `input_modalities` | `List[str]` | No | `None` | Input modalities | ```python -from agent.agentkit.vendors import CustomLLM +from shengwang_agent.agentkit.vendors import CustomLLM llm = CustomLLM(api_key='your-key', base_url='https://your-endpoint.com/v1') ``` @@ -133,7 +133,7 @@ llm = CustomLLM(api_key='your-key', base_url='https://your-endpoint.com/v1') | `skip_patterns` | `List[int]` | No | `None` | Skip patterns | ```python -from agent.agentkit.vendors import MiniMaxTTS +from shengwang_agent.agentkit.vendors import MiniMaxTTS tts = MiniMaxTTS(key='your-key', voice_id='your-voice-id') ``` @@ -207,7 +207,7 @@ tts = MiniMaxTTS(key='your-key', voice_id='your-voice-id') | `additional_params` | `Dict[str, Any]` | No | `None` | Additional parameters | ```python -from agent.agentkit.vendors import FengmingSTT +from shengwang_agent.agentkit.vendors import FengmingSTT stt = FengmingSTT(language='zh-CN') ``` @@ -271,7 +271,7 @@ stt = FengmingSTT(language='zh-CN') | `avatar_id` | `str` | No | `None` | Avatar ID | ```python -from agent.agentkit.vendors import SensetimeAvatar +from shengwang_agent.agentkit.vendors import SensetimeAvatar avatar = SensetimeAvatar(api_key='your-key', agora_uid='2') ``` diff --git a/pyproject.toml b/pyproject.toml index 5f5374d..14ffec8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ classifiers = [ "Typing :: Typed" ] packages = [ - { include = "agent", from = "src"} + { include = "shengwang_agent", from = "src"} ] [tool.poetry.urls] diff --git a/reference.md b/reference.md index ad26740..99a3086 100644 --- a/reference.md +++ b/reference.md @@ -27,8 +27,8 @@ Create and start a Conversational AI agent instance.
```python -from agent import AgentClient, MicrosoftTtsParams, Tts_Microsoft -from agent.agents import ( +from shengwang_agent import AgentClient, MicrosoftTtsParams, Tts_Microsoft +from shengwang_agent.agents import ( StartAgentsRequestProperties, StartAgentsRequestPropertiesAsr, StartAgentsRequestPropertiesLlm, @@ -149,7 +149,7 @@ Retrieve a list of agents that meet the specified conditions.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -283,7 +283,7 @@ Get the current state information of the specified agent instance.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -366,7 +366,7 @@ Call this endpoint while the agent is running to retrieve the conversation histo
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -447,7 +447,7 @@ Stop the specified conversational agent instance.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -528,8 +528,8 @@ Adjust Conversation AI Engine parameters at runtime.
```python -from agent import AgentClient -from agent.agents import ( +from shengwang_agent import AgentClient +from shengwang_agent.agents import ( UpdateAgentsRequestProperties, UpdateAgentsRequestPropertiesLlm, ) @@ -641,7 +641,7 @@ Note: The speak API is not supported when using `mllm` configuration.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -758,7 +758,7 @@ Interrupt the specified agent while speaking or thinking.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -840,7 +840,7 @@ Query historical call records for a specified appid based on the filter criteria
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -973,8 +973,8 @@ Use this endpoint to initiate an outbound call to the specified number and creat
```python -from agent import AgentClient -from agent.telephony import ( +from shengwang_agent import AgentClient +from shengwang_agent.telephony import ( CallTelephonyRequestProperties, CallTelephonyRequestSip, ) @@ -1098,7 +1098,7 @@ Retrieve the call status and related information of a specified agent.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -1179,7 +1179,7 @@ Instruct the agent to proactively hang up the ongoing call and leave the RTC cha
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -1261,7 +1261,7 @@ Retrieve a list of all imported phone numbers under the current account.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -1323,8 +1323,8 @@ Import a pre-configured phone number that can be used for inbound or outbound ca
```python -from agent import AgentClient -from agent.phone_numbers import ( +from shengwang_agent import AgentClient +from shengwang_agent.phone_numbers import ( AddPhoneNumbersRequestInboundConfig, AddPhoneNumbersRequestOutboundConfig, ) @@ -1462,7 +1462,7 @@ Retrieve detailed information for a specific phone number.
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -1537,7 +1537,7 @@ After calling this endpoint, the number stops receiving calls routed through thi
```python -from agent import AgentClient +from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -1609,8 +1609,8 @@ Update the configuration for a phone number.
```python -from agent import AgentClient -from agent.phone_numbers import ( +from shengwang_agent import AgentClient +from shengwang_agent.phone_numbers import ( UpdatePhoneNumbersRequestInboundConfig, UpdatePhoneNumbersRequestOutboundConfig, ) diff --git a/src/agent/__init__.py b/src/shengwang_agent/__init__.py similarity index 100% rename from src/agent/__init__.py rename to src/shengwang_agent/__init__.py diff --git a/src/agent/agentkit/__init__.py b/src/shengwang_agent/agentkit/__init__.py similarity index 100% rename from src/agent/agentkit/__init__.py rename to src/shengwang_agent/agentkit/__init__.py diff --git a/src/agent/agentkit/agent.py b/src/shengwang_agent/agentkit/agent.py similarity index 99% rename from src/agent/agentkit/agent.py rename to src/shengwang_agent/agentkit/agent.py index 3934d94..7349dd9 100644 --- a/src/agent/agentkit/agent.py +++ b/src/shengwang_agent/agentkit/agent.py @@ -106,8 +106,8 @@ class Agent: Examples -------- - >>> from agent.agentkit import Agent - >>> from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT + >>> from shengwang_agent.agentkit import Agent + >>> from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS, FengmingSTT >>> >>> agent = Agent(instructions="You are a helpful voice assistant.") >>> agent = ( diff --git a/src/agent/agentkit/agent_session.py b/src/shengwang_agent/agentkit/agent_session.py similarity index 98% rename from src/agent/agentkit/agent_session.py rename to src/shengwang_agent/agentkit/agent_session.py index a1fd181..1f38af5 100644 --- a/src/agent/agentkit/agent_session.py +++ b/src/shengwang_agent/agentkit/agent_session.py @@ -203,12 +203,12 @@ class AgentSession(_AgentSessionBase): Examples -------- - >>> from agent import AgentClient, Area - >>> from agent.agentkit import Agent + >>> from shengwang_agent import AgentClient, Area + >>> from shengwang_agent.agentkit import Agent >>> >>> client = AgentClient(area=Area.US, app_id="...", app_certificate="...") >>> agent = Agent(name="assistant", instructions="You are a helpful voice assistant.") - >>> from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS + >>> from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS >>> agent = agent.with_llm(AliyunLLM(url="https://...", api_key="...")).with_tts(MiniMaxTTS(key="...", model="speech-01-turbo", voice_setting={"voice_id": "female-shaonv"})) >>> session = agent.create_session(client, channel="room-123", agent_uid="1", remote_uids=["100"]) >>> agent_id = session.start() @@ -395,12 +395,12 @@ class AsyncAgentSession(_AgentSessionBase): Examples -------- - >>> from agent import AsyncAgentClient, Area - >>> from agent.agentkit import Agent + >>> from shengwang_agent import AsyncAgentClient, Area + >>> from shengwang_agent.agentkit import Agent >>> >>> client = AsyncAgentClient(area=Area.US, app_id="...", app_certificate="...") >>> agent = Agent(name="assistant", instructions="You are helpful.") - >>> from agent.agentkit.vendors import AliyunLLM, MiniMaxTTS + >>> from shengwang_agent.agentkit.vendors import AliyunLLM, MiniMaxTTS >>> agent = agent.with_llm(AliyunLLM(url="https://...", api_key="...")).with_tts(MiniMaxTTS(key="...", model="speech-01-turbo", voice_setting={"voice_id": "female-shaonv"})) >>> session = agent.create_async_session(client, channel="room-123", agent_uid="1", remote_uids=["100"]) >>> agent_id = await session.start() diff --git a/src/agent/agentkit/avatar_types.py b/src/shengwang_agent/agentkit/avatar_types.py similarity index 100% rename from src/agent/agentkit/avatar_types.py rename to src/shengwang_agent/agentkit/avatar_types.py diff --git a/src/agent/agentkit/constants.py b/src/shengwang_agent/agentkit/constants.py similarity index 100% rename from src/agent/agentkit/constants.py rename to src/shengwang_agent/agentkit/constants.py diff --git a/src/agent/agentkit/token.py b/src/shengwang_agent/agentkit/token.py similarity index 100% rename from src/agent/agentkit/token.py rename to src/shengwang_agent/agentkit/token.py diff --git a/src/agent/agentkit/vendors/__init__.py b/src/shengwang_agent/agentkit/vendors/__init__.py similarity index 100% rename from src/agent/agentkit/vendors/__init__.py rename to src/shengwang_agent/agentkit/vendors/__init__.py diff --git a/src/agent/agentkit/vendors/avatar.py b/src/shengwang_agent/agentkit/vendors/avatar.py similarity index 92% rename from src/agent/agentkit/vendors/avatar.py rename to src/shengwang_agent/agentkit/vendors/avatar.py index 1a3a5de..f493b66 100644 --- a/src/agent/agentkit/vendors/avatar.py +++ b/src/shengwang_agent/agentkit/vendors/avatar.py @@ -17,7 +17,7 @@ class SensetimeAvatarOptions(BaseModel): sceneList: List[Dict[str, Any]] = Field(..., description="Scene list with digital_role config") class Config: - extra = "forbid" + extra = "allow" class SensetimeAvatar(BaseAvatar): @@ -36,5 +36,7 @@ def to_config(self) -> Dict[str, Any]: "app_key": self.options.app_key, "sceneList": self.options.sceneList, } + if self.options.model_extra: + params.update(self.options.model_extra) return {"vendor": "sensetime", "params": params} diff --git a/src/agent/agentkit/vendors/base.py b/src/shengwang_agent/agentkit/vendors/base.py similarity index 100% rename from src/agent/agentkit/vendors/base.py rename to src/shengwang_agent/agentkit/vendors/base.py diff --git a/src/agent/agentkit/vendors/llm.py b/src/shengwang_agent/agentkit/vendors/llm.py similarity index 97% rename from src/agent/agentkit/vendors/llm.py rename to src/shengwang_agent/agentkit/vendors/llm.py index c95f2a0..547e299 100644 --- a/src/agent/agentkit/vendors/llm.py +++ b/src/shengwang_agent/agentkit/vendors/llm.py @@ -37,7 +37,7 @@ class _BaseLLMOptions(BaseModel): mcp_servers: Optional[List[Dict[str, Any]]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" def _build_llm_config(options: _BaseLLMOptions, vendor: Optional[str]) -> Dict[str, Any]: @@ -79,6 +79,9 @@ def _build_llm_config(options: _BaseLLMOptions, vendor: Optional[str]) -> Dict[s config["template_variables"] = options.template_variables if options.mcp_servers is not None: config["mcp_servers"] = _ensure_mcp_transport(options.mcp_servers) + # Forward any extra fields not explicitly defined + if options.model_extra: + config.update(options.model_extra) return config diff --git a/src/agent/agentkit/vendors/mllm.py b/src/shengwang_agent/agentkit/vendors/mllm.py similarity index 100% rename from src/agent/agentkit/vendors/mllm.py rename to src/shengwang_agent/agentkit/vendors/mllm.py diff --git a/src/agent/agentkit/vendors/stt.py b/src/shengwang_agent/agentkit/vendors/stt.py similarity index 91% rename from src/agent/agentkit/vendors/stt.py rename to src/shengwang_agent/agentkit/vendors/stt.py index 8c078ee..be2896e 100644 --- a/src/agent/agentkit/vendors/stt.py +++ b/src/shengwang_agent/agentkit/vendors/stt.py @@ -12,7 +12,7 @@ class FengmingSTTOptions(BaseModel): additional_params: Optional[Dict[str, Any]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class FengmingSTT(BaseSTT): @@ -23,6 +23,8 @@ def to_config(self) -> Dict[str, Any]: params: Dict[str, Any] = {} if self.options.additional_params is not None: params.update(self.options.additional_params) + if self.options.model_extra: + params.update(self.options.model_extra) return { "vendor": "fengming", @@ -43,7 +45,7 @@ class TencentSTTOptions(BaseModel): additional_params: Optional[Dict[str, Any]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class TencentSTT(BaseSTT): @@ -62,6 +64,8 @@ def to_config(self) -> Dict[str, Any]: params["voice_id"] = self.options.voice_id if self.options.additional_params is not None: params.update(self.options.additional_params) + if self.options.model_extra: + params.update(self.options.model_extra) return { "vendor": "tencent", @@ -80,7 +84,7 @@ class MicrosoftSTTOptions(BaseModel): additional_params: Optional[Dict[str, Any]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class MicrosoftSTT(BaseSTT): @@ -98,6 +102,8 @@ def to_config(self) -> Dict[str, Any]: params["phrase_list"] = self.options.phrase_list if self.options.additional_params is not None: params.update(self.options.additional_params) + if self.options.model_extra: + params.update(self.options.model_extra) return { "vendor": "microsoft", @@ -116,7 +122,7 @@ class XfyunSTTOptions(BaseModel): additional_params: Optional[Dict[str, Any]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class XfyunSTT(BaseSTT): @@ -133,6 +139,8 @@ def to_config(self) -> Dict[str, Any]: params["language"] = self.options.language if self.options.additional_params is not None: params.update(self.options.additional_params) + if self.options.model_extra: + params.update(self.options.model_extra) return { "vendor": "xfyun", @@ -152,7 +160,7 @@ class XfyunBigModelSTTOptions(BaseModel): additional_params: Optional[Dict[str, Any]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class XfyunBigModelSTT(BaseSTT): @@ -171,6 +179,8 @@ def to_config(self) -> Dict[str, Any]: params["language"] = self.options.language if self.options.additional_params is not None: params.update(self.options.additional_params) + if self.options.model_extra: + params.update(self.options.model_extra) return { "vendor": "xfyun_bigmodel", @@ -189,7 +199,7 @@ class XfyunDialectSTTOptions(BaseModel): additional_params: Optional[Dict[str, Any]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class XfyunDialectSTT(BaseSTT): @@ -206,6 +216,8 @@ def to_config(self) -> Dict[str, Any]: params["language"] = self.options.language if self.options.additional_params is not None: params.update(self.options.additional_params) + if self.options.model_extra: + params.update(self.options.model_extra) return { "vendor": "xfyun_dialect", diff --git a/src/agent/agentkit/vendors/tts.py b/src/shengwang_agent/agentkit/vendors/tts.py similarity index 92% rename from src/agent/agentkit/vendors/tts.py rename to src/shengwang_agent/agentkit/vendors/tts.py index fce3389..384606f 100644 --- a/src/agent/agentkit/vendors/tts.py +++ b/src/shengwang_agent/agentkit/vendors/tts.py @@ -11,6 +11,7 @@ class MiniMaxTTSOptions(BaseModel): key: str = Field(..., description="Minimax API key") model: str = Field(..., description="TTS model (e.g., speech-01-turbo)") voice_setting: Dict[str, Any] = Field(..., description="Voice settings (voice_id, speed, vol, pitch, emotion, etc.)") + url: str = Field(default="wss://api.minimax.chat/ws/v1/t2a_v2", description="WebSocket endpoint") group_id: Optional[str] = Field(default=None, description="Minimax group ID") audio_setting: Optional[Dict[str, Any]] = Field(default=None, description="Audio settings (sample_rate, etc.)") pronunciation_dict: Optional[Dict[str, Any]] = Field(default=None, description="Pronunciation dictionary") @@ -18,7 +19,7 @@ class MiniMaxTTSOptions(BaseModel): skip_patterns: Optional[List[int]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class MiniMaxTTS(BaseTTS): @@ -36,6 +37,7 @@ def to_config(self) -> Dict[str, Any]: "key": self.options.key, "model": self.options.model, "voice_setting": self.options.voice_setting, + "url": self.options.url, } if self.options.group_id is not None: params["group_id"] = self.options.group_id @@ -45,6 +47,8 @@ def to_config(self) -> Dict[str, Any]: params["pronunciation_dict"] = self.options.pronunciation_dict if self.options.language_boost is not None: params["language_boost"] = self.options.language_boost + if self.options.model_extra: + params.update(self.options.model_extra) result: Dict[str, Any] = {"vendor": "minimax", "params": params} if self.options.skip_patterns is not None: @@ -66,7 +70,7 @@ class TencentTTSOptions(BaseModel): skip_patterns: Optional[List[int]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class TencentTTS(BaseTTS): @@ -92,6 +96,8 @@ def to_config(self) -> Dict[str, Any]: params["emotion_category"] = self.options.emotion_category if self.options.emotion_intensity is not None: params["emotion_intensity"] = self.options.emotion_intensity + if self.options.model_extra: + params.update(self.options.model_extra) result: Dict[str, Any] = {"vendor": "tencent", "params": params} if self.options.skip_patterns is not None: @@ -113,7 +119,7 @@ class BytedanceTTSOptions(BaseModel): skip_patterns: Optional[List[int]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class BytedanceTTS(BaseTTS): @@ -140,6 +146,8 @@ def to_config(self) -> Dict[str, Any]: params["pitch_ratio"] = self.options.pitch_ratio if self.options.emotion is not None: params["emotion"] = self.options.emotion + if self.options.model_extra: + params.update(self.options.model_extra) result: Dict[str, Any] = {"vendor": "bytedance", "params": params} if self.options.skip_patterns is not None: @@ -159,7 +167,7 @@ class MicrosoftTTSOptions(BaseModel): skip_patterns: Optional[List[int]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class MicrosoftTTS(BaseTTS): @@ -182,6 +190,8 @@ def to_config(self) -> Dict[str, Any]: params["volume"] = self.options.volume if self.options.sample_rate is not None: params["sample_rate"] = self.options.sample_rate + if self.options.model_extra: + params.update(self.options.model_extra) result: Dict[str, Any] = {"vendor": "microsoft", "params": params} if self.options.skip_patterns is not None: @@ -199,7 +209,7 @@ class CosyVoiceTTSOptions(BaseModel): skip_patterns: Optional[List[int]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class CosyVoiceTTS(BaseTTS): @@ -218,6 +228,8 @@ def to_config(self) -> Dict[str, Any]: } if self.options.sample_rate is not None: params["sample_rate"] = self.options.sample_rate + if self.options.model_extra: + params.update(self.options.model_extra) result: Dict[str, Any] = {"vendor": "cosyvoice", "params": params} if self.options.skip_patterns is not None: @@ -234,7 +246,7 @@ class BytedanceDuplexTTSOptions(BaseModel): skip_patterns: Optional[List[int]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class BytedanceDuplexTTS(BaseTTS): @@ -251,6 +263,8 @@ def to_config(self) -> Dict[str, Any]: "token": self.options.token, "speaker": self.options.speaker, } + if self.options.model_extra: + params.update(self.options.model_extra) result: Dict[str, Any] = {"vendor": "bytedance_duplex", "params": params} if self.options.skip_patterns is not None: @@ -267,7 +281,7 @@ class StepFunTTSOptions(BaseModel): skip_patterns: Optional[List[int]] = Field(default=None) class Config: - extra = "forbid" + extra = "allow" class StepFunTTS(BaseTTS): @@ -284,6 +298,8 @@ def to_config(self) -> Dict[str, Any]: "model": self.options.model, "voice_id": self.options.voice_id, } + if self.options.model_extra: + params.update(self.options.model_extra) result: Dict[str, Any] = {"vendor": "stepfun", "params": params} if self.options.skip_patterns is not None: diff --git a/src/agent/agents/__init__.py b/src/shengwang_agent/agents/__init__.py similarity index 100% rename from src/agent/agents/__init__.py rename to src/shengwang_agent/agents/__init__.py diff --git a/src/agent/agents/client.py b/src/shengwang_agent/agents/client.py similarity index 96% rename from src/agent/agents/client.py rename to src/shengwang_agent/agents/client.py index c58267a..27f7312 100644 --- a/src/agent/agents/client.py +++ b/src/shengwang_agent/agents/client.py @@ -70,8 +70,8 @@ def start( Examples -------- - from agent import AgentClient, MicrosoftTtsParams, Tts_Microsoft - from agent.agents import ( + from shengwang_agent import AgentClient, MicrosoftTtsParams, Tts_Microsoft + from shengwang_agent.agents import ( StartAgentsRequestProperties, StartAgentsRequestPropertiesAsr, StartAgentsRequestPropertiesLlm, @@ -173,7 +173,7 @@ def list( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -224,7 +224,7 @@ def get( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -265,7 +265,7 @@ def get_history( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -301,7 +301,7 @@ def stop(self, appid: str, agent_id: str, *, request_options: typing.Optional[Re Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -348,8 +348,8 @@ def update( Examples -------- - from agent import AgentClient - from agent.agents import ( + from shengwang_agent import AgentClient + from shengwang_agent.agents import ( UpdateAgentsRequestProperties, UpdateAgentsRequestPropertiesLlm, ) @@ -432,7 +432,7 @@ def speak( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -476,7 +476,7 @@ def interrupt( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -541,8 +541,8 @@ async def start( -------- import asyncio - from agent import AsyncAgentClient, MicrosoftTtsParams, Tts_Microsoft - from agent.agents import ( + from shengwang_agent import AsyncAgentClient, MicrosoftTtsParams, Tts_Microsoft + from shengwang_agent.agents import ( StartAgentsRequestProperties, StartAgentsRequestPropertiesAsr, StartAgentsRequestPropertiesLlm, @@ -654,7 +654,7 @@ async def list( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -714,7 +714,7 @@ async def get( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -763,7 +763,7 @@ async def get_history( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -807,7 +807,7 @@ async def stop(self, appid: str, agent_id: str, *, request_options: typing.Optio -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -862,8 +862,8 @@ async def update( -------- import asyncio - from agent import AsyncAgentClient - from agent.agents import ( + from shengwang_agent import AsyncAgentClient + from shengwang_agent.agents import ( UpdateAgentsRequestProperties, UpdateAgentsRequestPropertiesLlm, ) @@ -956,7 +956,7 @@ async def speak( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -1008,7 +1008,7 @@ async def interrupt( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", diff --git a/src/agent/agents/raw_client.py b/src/shengwang_agent/agents/raw_client.py similarity index 100% rename from src/agent/agents/raw_client.py rename to src/shengwang_agent/agents/raw_client.py diff --git a/src/agent/agents/types/__init__.py b/src/shengwang_agent/agents/types/__init__.py similarity index 100% rename from src/agent/agents/types/__init__.py rename to src/shengwang_agent/agents/types/__init__.py diff --git a/src/agent/agents/types/get_agents_response.py b/src/shengwang_agent/agents/types/get_agents_response.py similarity index 100% rename from src/agent/agents/types/get_agents_response.py rename to src/shengwang_agent/agents/types/get_agents_response.py diff --git a/src/agent/agents/types/get_agents_response_status.py b/src/shengwang_agent/agents/types/get_agents_response_status.py similarity index 100% rename from src/agent/agents/types/get_agents_response_status.py rename to src/shengwang_agent/agents/types/get_agents_response_status.py diff --git a/src/agent/agents/types/get_history_agents_response.py b/src/shengwang_agent/agents/types/get_history_agents_response.py similarity index 100% rename from src/agent/agents/types/get_history_agents_response.py rename to src/shengwang_agent/agents/types/get_history_agents_response.py diff --git a/src/agent/agents/types/get_history_agents_response_contents_item.py b/src/shengwang_agent/agents/types/get_history_agents_response_contents_item.py similarity index 100% rename from src/agent/agents/types/get_history_agents_response_contents_item.py rename to src/shengwang_agent/agents/types/get_history_agents_response_contents_item.py diff --git a/src/agent/agents/types/get_history_agents_response_contents_item_role.py b/src/shengwang_agent/agents/types/get_history_agents_response_contents_item_role.py similarity index 100% rename from src/agent/agents/types/get_history_agents_response_contents_item_role.py rename to src/shengwang_agent/agents/types/get_history_agents_response_contents_item_role.py diff --git a/src/agent/agents/types/interrupt_agents_response.py b/src/shengwang_agent/agents/types/interrupt_agents_response.py similarity index 100% rename from src/agent/agents/types/interrupt_agents_response.py rename to src/shengwang_agent/agents/types/interrupt_agents_response.py diff --git a/src/agent/agents/types/list_agents_request_state.py b/src/shengwang_agent/agents/types/list_agents_request_state.py similarity index 100% rename from src/agent/agents/types/list_agents_request_state.py rename to src/shengwang_agent/agents/types/list_agents_request_state.py diff --git a/src/agent/agents/types/list_agents_response.py b/src/shengwang_agent/agents/types/list_agents_response.py similarity index 100% rename from src/agent/agents/types/list_agents_response.py rename to src/shengwang_agent/agents/types/list_agents_response.py diff --git a/src/agent/agents/types/list_agents_response_data.py b/src/shengwang_agent/agents/types/list_agents_response_data.py similarity index 100% rename from src/agent/agents/types/list_agents_response_data.py rename to src/shengwang_agent/agents/types/list_agents_response_data.py diff --git a/src/agent/agents/types/list_agents_response_data_list_item.py b/src/shengwang_agent/agents/types/list_agents_response_data_list_item.py similarity index 100% rename from src/agent/agents/types/list_agents_response_data_list_item.py rename to src/shengwang_agent/agents/types/list_agents_response_data_list_item.py diff --git a/src/agent/agents/types/list_agents_response_data_list_item_status.py b/src/shengwang_agent/agents/types/list_agents_response_data_list_item_status.py similarity index 100% rename from src/agent/agents/types/list_agents_response_data_list_item_status.py rename to src/shengwang_agent/agents/types/list_agents_response_data_list_item_status.py diff --git a/src/agent/agents/types/list_agents_response_meta.py b/src/shengwang_agent/agents/types/list_agents_response_meta.py similarity index 100% rename from src/agent/agents/types/list_agents_response_meta.py rename to src/shengwang_agent/agents/types/list_agents_response_meta.py diff --git a/src/agent/agents/types/speak_agents_request_priority.py b/src/shengwang_agent/agents/types/speak_agents_request_priority.py similarity index 100% rename from src/agent/agents/types/speak_agents_request_priority.py rename to src/shengwang_agent/agents/types/speak_agents_request_priority.py diff --git a/src/agent/agents/types/speak_agents_response.py b/src/shengwang_agent/agents/types/speak_agents_response.py similarity index 100% rename from src/agent/agents/types/speak_agents_response.py rename to src/shengwang_agent/agents/types/speak_agents_response.py diff --git a/src/agent/agents/types/start_agents_request_properties.py b/src/shengwang_agent/agents/types/start_agents_request_properties.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties.py rename to src/shengwang_agent/agents/types/start_agents_request_properties.py diff --git a/src/agent/agents/types/start_agents_request_properties_advanced_features.py b/src/shengwang_agent/agents/types/start_agents_request_properties_advanced_features.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_advanced_features.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_advanced_features.py diff --git a/src/agent/agents/types/start_agents_request_properties_asr.py b/src/shengwang_agent/agents/types/start_agents_request_properties_asr.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_asr.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_asr.py diff --git a/src/agent/agents/types/start_agents_request_properties_asr_vendor.py b/src/shengwang_agent/agents/types/start_agents_request_properties_asr_vendor.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_asr_vendor.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_asr_vendor.py diff --git a/src/agent/agents/types/start_agents_request_properties_avatar.py b/src/shengwang_agent/agents/types/start_agents_request_properties_avatar.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_avatar.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_avatar.py diff --git a/src/agent/agents/types/start_agents_request_properties_avatar_vendor.py b/src/shengwang_agent/agents/types/start_agents_request_properties_avatar_vendor.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_avatar_vendor.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_avatar_vendor.py diff --git a/src/agent/agents/types/start_agents_request_properties_filler_words.py b/src/shengwang_agent/agents/types/start_agents_request_properties_filler_words.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_filler_words.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_filler_words.py diff --git a/src/agent/agents/types/start_agents_request_properties_filler_words_content.py b/src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_content.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_filler_words_content.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_content.py diff --git a/src/agent/agents/types/start_agents_request_properties_filler_words_content_static_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_content_static_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_filler_words_content_static_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_content_static_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_filler_words_content_static_config_selection_rule.py b/src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_content_static_config_selection_rule.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_filler_words_content_static_config_selection_rule.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_content_static_config_selection_rule.py diff --git a/src/agent/agents/types/start_agents_request_properties_filler_words_trigger.py b/src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_trigger.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_filler_words_trigger.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_trigger.py diff --git a/src/agent/agents/types/start_agents_request_properties_filler_words_trigger_fixed_time_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_trigger_fixed_time_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_filler_words_trigger_fixed_time_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_filler_words_trigger_fixed_time_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_geofence.py b/src/shengwang_agent/agents/types/start_agents_request_properties_geofence.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_geofence.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_geofence.py diff --git a/src/agent/agents/types/start_agents_request_properties_geofence_area.py b/src/shengwang_agent/agents/types/start_agents_request_properties_geofence_area.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_geofence_area.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_geofence_area.py diff --git a/src/agent/agents/types/start_agents_request_properties_geofence_exclude_area.py b/src/shengwang_agent/agents/types/start_agents_request_properties_geofence_exclude_area.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_geofence_exclude_area.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_geofence_exclude_area.py diff --git a/src/agent/agents/types/start_agents_request_properties_llm.py b/src/shengwang_agent/agents/types/start_agents_request_properties_llm.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_llm.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_llm.py diff --git a/src/agent/agents/types/start_agents_request_properties_llm_greeting_configs.py b/src/shengwang_agent/agents/types/start_agents_request_properties_llm_greeting_configs.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_llm_greeting_configs.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_llm_greeting_configs.py diff --git a/src/agent/agents/types/start_agents_request_properties_llm_greeting_configs_mode.py b/src/shengwang_agent/agents/types/start_agents_request_properties_llm_greeting_configs_mode.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_llm_greeting_configs_mode.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_llm_greeting_configs_mode.py diff --git a/src/agent/agents/types/start_agents_request_properties_llm_mcp_servers_item.py b/src/shengwang_agent/agents/types/start_agents_request_properties_llm_mcp_servers_item.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_llm_mcp_servers_item.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_llm_mcp_servers_item.py diff --git a/src/agent/agents/types/start_agents_request_properties_llm_style.py b/src/shengwang_agent/agents/types/start_agents_request_properties_llm_style.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_llm_style.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_llm_style.py diff --git a/src/agent/agents/types/start_agents_request_properties_mllm.py b/src/shengwang_agent/agents/types/start_agents_request_properties_mllm.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_mllm.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_mllm.py diff --git a/src/agent/agents/types/start_agents_request_properties_mllm_vendor.py b/src/shengwang_agent/agents/types/start_agents_request_properties_mllm_vendor.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_mllm_vendor.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_mllm_vendor.py diff --git a/src/agent/agents/types/start_agents_request_properties_parameters.py b/src/shengwang_agent/agents/types/start_agents_request_properties_parameters.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_parameters.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_parameters.py diff --git a/src/agent/agents/types/start_agents_request_properties_parameters_data_channel.py b/src/shengwang_agent/agents/types/start_agents_request_properties_parameters_data_channel.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_parameters_data_channel.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_parameters_data_channel.py diff --git a/src/agent/agents/types/start_agents_request_properties_parameters_farewell_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_parameters_farewell_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_parameters_farewell_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_parameters_farewell_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_parameters_silence_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_parameters_silence_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_parameters_silence_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_parameters_silence_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_parameters_silence_config_action.py b/src/shengwang_agent/agents/types/start_agents_request_properties_parameters_silence_config_action.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_parameters_silence_config_action.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_parameters_silence_config_action.py diff --git a/src/agent/agents/types/start_agents_request_properties_rtc.py b/src/shengwang_agent/agents/types/start_agents_request_properties_rtc.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_rtc.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_rtc.py diff --git a/src/agent/agents/types/start_agents_request_properties_sal.py b/src/shengwang_agent/agents/types/start_agents_request_properties_sal.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_sal.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_sal.py diff --git a/src/agent/agents/types/start_agents_request_properties_sal_sal_mode.py b/src/shengwang_agent/agents/types/start_agents_request_properties_sal_sal_mode.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_sal_sal_mode.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_sal_sal_mode.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_mode.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_mode.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_mode.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_mode.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_semantic_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_semantic_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_semantic_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_semantic_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_vad_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_vad_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_vad_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_end_of_speech_vad_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config_strategy.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config_strategy.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config_strategy.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_disabled_config_strategy.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_keywords_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_keywords_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_keywords_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_keywords_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_mode.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_mode.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_mode.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_mode.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_vad_config.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_vad_config.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_vad_config.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_config_start_of_speech_vad_config.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_eagerness.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_eagerness.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_eagerness.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_eagerness.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_interrupt_mode.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_interrupt_mode.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_interrupt_mode.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_interrupt_mode.py diff --git a/src/agent/agents/types/start_agents_request_properties_turn_detection_type.py b/src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_type.py similarity index 100% rename from src/agent/agents/types/start_agents_request_properties_turn_detection_type.py rename to src/shengwang_agent/agents/types/start_agents_request_properties_turn_detection_type.py diff --git a/src/agent/agents/types/start_agents_response.py b/src/shengwang_agent/agents/types/start_agents_response.py similarity index 100% rename from src/agent/agents/types/start_agents_response.py rename to src/shengwang_agent/agents/types/start_agents_response.py diff --git a/src/agent/agents/types/start_agents_response_status.py b/src/shengwang_agent/agents/types/start_agents_response_status.py similarity index 100% rename from src/agent/agents/types/start_agents_response_status.py rename to src/shengwang_agent/agents/types/start_agents_response_status.py diff --git a/src/agent/agents/types/update_agents_request_properties.py b/src/shengwang_agent/agents/types/update_agents_request_properties.py similarity index 100% rename from src/agent/agents/types/update_agents_request_properties.py rename to src/shengwang_agent/agents/types/update_agents_request_properties.py diff --git a/src/agent/agents/types/update_agents_request_properties_llm.py b/src/shengwang_agent/agents/types/update_agents_request_properties_llm.py similarity index 100% rename from src/agent/agents/types/update_agents_request_properties_llm.py rename to src/shengwang_agent/agents/types/update_agents_request_properties_llm.py diff --git a/src/agent/agents/types/update_agents_request_properties_mllm.py b/src/shengwang_agent/agents/types/update_agents_request_properties_mllm.py similarity index 100% rename from src/agent/agents/types/update_agents_request_properties_mllm.py rename to src/shengwang_agent/agents/types/update_agents_request_properties_mllm.py diff --git a/src/agent/agents/types/update_agents_response.py b/src/shengwang_agent/agents/types/update_agents_response.py similarity index 100% rename from src/agent/agents/types/update_agents_response.py rename to src/shengwang_agent/agents/types/update_agents_response.py diff --git a/src/agent/agents/types/update_agents_response_status.py b/src/shengwang_agent/agents/types/update_agents_response_status.py similarity index 100% rename from src/agent/agents/types/update_agents_response_status.py rename to src/shengwang_agent/agents/types/update_agents_response_status.py diff --git a/src/agent/client.py b/src/shengwang_agent/client.py similarity index 98% rename from src/agent/client.py rename to src/shengwang_agent/client.py index 85125a6..0085b08 100644 --- a/src/agent/client.py +++ b/src/shengwang_agent/client.py @@ -49,7 +49,7 @@ class AgentClient: Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -151,7 +151,7 @@ class AsyncAgentClient: Examples -------- - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", diff --git a/src/agent/core/__init__.py b/src/shengwang_agent/core/__init__.py similarity index 100% rename from src/agent/core/__init__.py rename to src/shengwang_agent/core/__init__.py diff --git a/src/agent/core/api_error.py b/src/shengwang_agent/core/api_error.py similarity index 100% rename from src/agent/core/api_error.py rename to src/shengwang_agent/core/api_error.py diff --git a/src/agent/core/client_wrapper.py b/src/shengwang_agent/core/client_wrapper.py similarity index 100% rename from src/agent/core/client_wrapper.py rename to src/shengwang_agent/core/client_wrapper.py diff --git a/src/agent/core/datetime_utils.py b/src/shengwang_agent/core/datetime_utils.py similarity index 100% rename from src/agent/core/datetime_utils.py rename to src/shengwang_agent/core/datetime_utils.py diff --git a/src/agent/core/domain.py b/src/shengwang_agent/core/domain.py similarity index 100% rename from src/agent/core/domain.py rename to src/shengwang_agent/core/domain.py diff --git a/src/agent/core/file.py b/src/shengwang_agent/core/file.py similarity index 100% rename from src/agent/core/file.py rename to src/shengwang_agent/core/file.py diff --git a/src/agent/core/force_multipart.py b/src/shengwang_agent/core/force_multipart.py similarity index 100% rename from src/agent/core/force_multipart.py rename to src/shengwang_agent/core/force_multipart.py diff --git a/src/agent/core/http_client.py b/src/shengwang_agent/core/http_client.py similarity index 100% rename from src/agent/core/http_client.py rename to src/shengwang_agent/core/http_client.py diff --git a/src/agent/core/http_response.py b/src/shengwang_agent/core/http_response.py similarity index 100% rename from src/agent/core/http_response.py rename to src/shengwang_agent/core/http_response.py diff --git a/src/agent/core/http_sse/__init__.py b/src/shengwang_agent/core/http_sse/__init__.py similarity index 100% rename from src/agent/core/http_sse/__init__.py rename to src/shengwang_agent/core/http_sse/__init__.py diff --git a/src/agent/core/http_sse/_api.py b/src/shengwang_agent/core/http_sse/_api.py similarity index 100% rename from src/agent/core/http_sse/_api.py rename to src/shengwang_agent/core/http_sse/_api.py diff --git a/src/agent/core/http_sse/_decoders.py b/src/shengwang_agent/core/http_sse/_decoders.py similarity index 100% rename from src/agent/core/http_sse/_decoders.py rename to src/shengwang_agent/core/http_sse/_decoders.py diff --git a/src/agent/core/http_sse/_exceptions.py b/src/shengwang_agent/core/http_sse/_exceptions.py similarity index 100% rename from src/agent/core/http_sse/_exceptions.py rename to src/shengwang_agent/core/http_sse/_exceptions.py diff --git a/src/agent/core/http_sse/_models.py b/src/shengwang_agent/core/http_sse/_models.py similarity index 100% rename from src/agent/core/http_sse/_models.py rename to src/shengwang_agent/core/http_sse/_models.py diff --git a/src/agent/core/jsonable_encoder.py b/src/shengwang_agent/core/jsonable_encoder.py similarity index 100% rename from src/agent/core/jsonable_encoder.py rename to src/shengwang_agent/core/jsonable_encoder.py diff --git a/src/agent/core/pagination.py b/src/shengwang_agent/core/pagination.py similarity index 100% rename from src/agent/core/pagination.py rename to src/shengwang_agent/core/pagination.py diff --git a/src/agent/core/pydantic_utilities.py b/src/shengwang_agent/core/pydantic_utilities.py similarity index 100% rename from src/agent/core/pydantic_utilities.py rename to src/shengwang_agent/core/pydantic_utilities.py diff --git a/src/agent/core/query_encoder.py b/src/shengwang_agent/core/query_encoder.py similarity index 100% rename from src/agent/core/query_encoder.py rename to src/shengwang_agent/core/query_encoder.py diff --git a/src/agent/core/remove_none_from_dict.py b/src/shengwang_agent/core/remove_none_from_dict.py similarity index 100% rename from src/agent/core/remove_none_from_dict.py rename to src/shengwang_agent/core/remove_none_from_dict.py diff --git a/src/agent/core/request_options.py b/src/shengwang_agent/core/request_options.py similarity index 100% rename from src/agent/core/request_options.py rename to src/shengwang_agent/core/request_options.py diff --git a/src/agent/core/serialization.py b/src/shengwang_agent/core/serialization.py similarity index 100% rename from src/agent/core/serialization.py rename to src/shengwang_agent/core/serialization.py diff --git a/src/agent/core/unchecked_base_model.py b/src/shengwang_agent/core/unchecked_base_model.py similarity index 100% rename from src/agent/core/unchecked_base_model.py rename to src/shengwang_agent/core/unchecked_base_model.py diff --git a/src/agent/environment.py b/src/shengwang_agent/environment.py similarity index 100% rename from src/agent/environment.py rename to src/shengwang_agent/environment.py diff --git a/src/agent/phone_numbers/__init__.py b/src/shengwang_agent/phone_numbers/__init__.py similarity index 100% rename from src/agent/phone_numbers/__init__.py rename to src/shengwang_agent/phone_numbers/__init__.py diff --git a/src/agent/phone_numbers/client.py b/src/shengwang_agent/phone_numbers/client.py similarity index 96% rename from src/agent/phone_numbers/client.py rename to src/shengwang_agent/phone_numbers/client.py index 60be824..35c4f79 100644 --- a/src/agent/phone_numbers/client.py +++ b/src/shengwang_agent/phone_numbers/client.py @@ -52,7 +52,7 @@ def list( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -114,8 +114,8 @@ def add( Examples -------- - from agent import AgentClient - from agent.phone_numbers import ( + from shengwang_agent import AgentClient + from shengwang_agent.phone_numbers import ( AddPhoneNumbersRequestInboundConfig, AddPhoneNumbersRequestOutboundConfig, ) @@ -173,7 +173,7 @@ def get( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -208,7 +208,7 @@ def delete(self, phone_number: str, *, request_options: typing.Optional[RequestO Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -254,8 +254,8 @@ def update( Examples -------- - from agent import AgentClient - from agent.phone_numbers import ( + from shengwang_agent import AgentClient + from shengwang_agent.phone_numbers import ( UpdatePhoneNumbersRequestInboundConfig, UpdatePhoneNumbersRequestOutboundConfig, ) @@ -319,7 +319,7 @@ async def list( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -389,8 +389,8 @@ async def add( -------- import asyncio - from agent import AsyncAgentClient - from agent.phone_numbers import ( + from shengwang_agent import AsyncAgentClient + from shengwang_agent.phone_numbers import ( AddPhoneNumbersRequestInboundConfig, AddPhoneNumbersRequestOutboundConfig, ) @@ -456,7 +456,7 @@ async def get( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -499,7 +499,7 @@ async def delete(self, phone_number: str, *, request_options: typing.Optional[Re -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -553,8 +553,8 @@ async def update( -------- import asyncio - from agent import AsyncAgentClient - from agent.phone_numbers import ( + from shengwang_agent import AsyncAgentClient + from shengwang_agent.phone_numbers import ( UpdatePhoneNumbersRequestInboundConfig, UpdatePhoneNumbersRequestOutboundConfig, ) diff --git a/src/agent/phone_numbers/raw_client.py b/src/shengwang_agent/phone_numbers/raw_client.py similarity index 100% rename from src/agent/phone_numbers/raw_client.py rename to src/shengwang_agent/phone_numbers/raw_client.py diff --git a/src/agent/phone_numbers/types/__init__.py b/src/shengwang_agent/phone_numbers/types/__init__.py similarity index 100% rename from src/agent/phone_numbers/types/__init__.py rename to src/shengwang_agent/phone_numbers/types/__init__.py diff --git a/src/agent/phone_numbers/types/add_phone_numbers_request_inbound_config.py b/src/shengwang_agent/phone_numbers/types/add_phone_numbers_request_inbound_config.py similarity index 100% rename from src/agent/phone_numbers/types/add_phone_numbers_request_inbound_config.py rename to src/shengwang_agent/phone_numbers/types/add_phone_numbers_request_inbound_config.py diff --git a/src/agent/phone_numbers/types/add_phone_numbers_request_outbound_config.py b/src/shengwang_agent/phone_numbers/types/add_phone_numbers_request_outbound_config.py similarity index 100% rename from src/agent/phone_numbers/types/add_phone_numbers_request_outbound_config.py rename to src/shengwang_agent/phone_numbers/types/add_phone_numbers_request_outbound_config.py diff --git a/src/agent/phone_numbers/types/add_phone_numbers_request_provider.py b/src/shengwang_agent/phone_numbers/types/add_phone_numbers_request_provider.py similarity index 100% rename from src/agent/phone_numbers/types/add_phone_numbers_request_provider.py rename to src/shengwang_agent/phone_numbers/types/add_phone_numbers_request_provider.py diff --git a/src/agent/phone_numbers/types/add_phone_numbers_response.py b/src/shengwang_agent/phone_numbers/types/add_phone_numbers_response.py similarity index 100% rename from src/agent/phone_numbers/types/add_phone_numbers_response.py rename to src/shengwang_agent/phone_numbers/types/add_phone_numbers_response.py diff --git a/src/agent/phone_numbers/types/add_phone_numbers_response_associated_pipeline.py b/src/shengwang_agent/phone_numbers/types/add_phone_numbers_response_associated_pipeline.py similarity index 100% rename from src/agent/phone_numbers/types/add_phone_numbers_response_associated_pipeline.py rename to src/shengwang_agent/phone_numbers/types/add_phone_numbers_response_associated_pipeline.py diff --git a/src/agent/phone_numbers/types/get_phone_numbers_response.py b/src/shengwang_agent/phone_numbers/types/get_phone_numbers_response.py similarity index 100% rename from src/agent/phone_numbers/types/get_phone_numbers_response.py rename to src/shengwang_agent/phone_numbers/types/get_phone_numbers_response.py diff --git a/src/agent/phone_numbers/types/get_phone_numbers_response_associated_pipeline.py b/src/shengwang_agent/phone_numbers/types/get_phone_numbers_response_associated_pipeline.py similarity index 100% rename from src/agent/phone_numbers/types/get_phone_numbers_response_associated_pipeline.py rename to src/shengwang_agent/phone_numbers/types/get_phone_numbers_response_associated_pipeline.py diff --git a/src/agent/phone_numbers/types/get_phone_numbers_response_provider.py b/src/shengwang_agent/phone_numbers/types/get_phone_numbers_response_provider.py similarity index 100% rename from src/agent/phone_numbers/types/get_phone_numbers_response_provider.py rename to src/shengwang_agent/phone_numbers/types/get_phone_numbers_response_provider.py diff --git a/src/agent/phone_numbers/types/list_phone_numbers_response_item.py b/src/shengwang_agent/phone_numbers/types/list_phone_numbers_response_item.py similarity index 100% rename from src/agent/phone_numbers/types/list_phone_numbers_response_item.py rename to src/shengwang_agent/phone_numbers/types/list_phone_numbers_response_item.py diff --git a/src/agent/phone_numbers/types/list_phone_numbers_response_item_associated_pipeline.py b/src/shengwang_agent/phone_numbers/types/list_phone_numbers_response_item_associated_pipeline.py similarity index 100% rename from src/agent/phone_numbers/types/list_phone_numbers_response_item_associated_pipeline.py rename to src/shengwang_agent/phone_numbers/types/list_phone_numbers_response_item_associated_pipeline.py diff --git a/src/agent/phone_numbers/types/list_phone_numbers_response_item_provider.py b/src/shengwang_agent/phone_numbers/types/list_phone_numbers_response_item_provider.py similarity index 100% rename from src/agent/phone_numbers/types/list_phone_numbers_response_item_provider.py rename to src/shengwang_agent/phone_numbers/types/list_phone_numbers_response_item_provider.py diff --git a/src/agent/phone_numbers/types/update_phone_numbers_request_inbound_config.py b/src/shengwang_agent/phone_numbers/types/update_phone_numbers_request_inbound_config.py similarity index 100% rename from src/agent/phone_numbers/types/update_phone_numbers_request_inbound_config.py rename to src/shengwang_agent/phone_numbers/types/update_phone_numbers_request_inbound_config.py diff --git a/src/agent/phone_numbers/types/update_phone_numbers_request_outbound_config.py b/src/shengwang_agent/phone_numbers/types/update_phone_numbers_request_outbound_config.py similarity index 100% rename from src/agent/phone_numbers/types/update_phone_numbers_request_outbound_config.py rename to src/shengwang_agent/phone_numbers/types/update_phone_numbers_request_outbound_config.py diff --git a/src/agent/phone_numbers/types/update_phone_numbers_response.py b/src/shengwang_agent/phone_numbers/types/update_phone_numbers_response.py similarity index 100% rename from src/agent/phone_numbers/types/update_phone_numbers_response.py rename to src/shengwang_agent/phone_numbers/types/update_phone_numbers_response.py diff --git a/src/agent/phone_numbers/types/update_phone_numbers_response_associated_pipeline.py b/src/shengwang_agent/phone_numbers/types/update_phone_numbers_response_associated_pipeline.py similarity index 100% rename from src/agent/phone_numbers/types/update_phone_numbers_response_associated_pipeline.py rename to src/shengwang_agent/phone_numbers/types/update_phone_numbers_response_associated_pipeline.py diff --git a/src/agent/phone_numbers/types/update_phone_numbers_response_provider.py b/src/shengwang_agent/phone_numbers/types/update_phone_numbers_response_provider.py similarity index 100% rename from src/agent/phone_numbers/types/update_phone_numbers_response_provider.py rename to src/shengwang_agent/phone_numbers/types/update_phone_numbers_response_provider.py diff --git a/src/agent/pool_client.py b/src/shengwang_agent/pool_client.py similarity index 97% rename from src/agent/pool_client.py rename to src/shengwang_agent/pool_client.py index c0ac7e6..67ccd88 100644 --- a/src/agent/pool_client.py +++ b/src/shengwang_agent/pool_client.py @@ -15,7 +15,7 @@ from .agentkit.token import generate_convo_ai_token _AUTH_MODE = typing.Literal["app-credentials", "basic", "token"] -_DEBUG_LOGGER = logging.getLogger("agent") +_DEBUG_LOGGER = logging.getLogger("shengwang_agent") def _redact_headers(headers: typing.Mapping[str, str]) -> typing.Dict[str, str]: @@ -164,15 +164,15 @@ class AgentClient(BaseAgentClient): debug : bool If True, log HTTP requests and responses (method, URL, headers, status). - Uses the ``agent`` logger; enable with - ``logging.getLogger("agent").setLevel(logging.DEBUG)`` or pass + Uses the ``shengwang_agent`` logger; enable with + ``logging.getLogger("shengwang_agent").setLevel(logging.DEBUG)`` or pass ``debug=True`` which configures the logger automatically. Ignored when ``httpx_client`` is provided. Examples -------- # App-credentials mode (auto token generation per request) - from agent import AgentClient, Area + from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.US, @@ -181,7 +181,7 @@ class AgentClient(BaseAgentClient): ) # Basic auth mode - from agent import AgentClient, Area + from shengwang_agent import AgentClient, Area client = AgentClient( area=Area.US, @@ -192,8 +192,8 @@ class AgentClient(BaseAgentClient): ) # Pre-built token mode (for debugging or custom token lifecycles) - from agent import AgentClient, Area - from agent.agentkit.token import generate_convo_ai_token + from shengwang_agent import AgentClient, Area + from shengwang_agent.agentkit.token import generate_convo_ai_token raw_token = generate_convo_ai_token(app_id="...", app_certificate="...", channel_name="...", account="1") client = AgentClient( @@ -395,7 +395,7 @@ class AsyncAgentClient(BaseAsyncAgentClient): Examples -------- # App-credentials mode (auto token generation per request) - from agent import AsyncAgentClient, Area + from shengwang_agent import AsyncAgentClient, Area client = AsyncAgentClient( area=Area.US, @@ -404,7 +404,7 @@ class AsyncAgentClient(BaseAsyncAgentClient): ) # Basic auth mode - from agent import AsyncAgentClient, Area + from shengwang_agent import AsyncAgentClient, Area client = AsyncAgentClient( area=Area.US, diff --git a/src/agent/py.typed b/src/shengwang_agent/py.typed similarity index 100% rename from src/agent/py.typed rename to src/shengwang_agent/py.typed diff --git a/src/agent/telephony/__init__.py b/src/shengwang_agent/telephony/__init__.py similarity index 100% rename from src/agent/telephony/__init__.py rename to src/shengwang_agent/telephony/__init__.py diff --git a/src/agent/telephony/client.py b/src/shengwang_agent/telephony/client.py similarity index 97% rename from src/agent/telephony/client.py rename to src/shengwang_agent/telephony/client.py index fff6848..eddc1e0 100644 --- a/src/agent/telephony/client.py +++ b/src/shengwang_agent/telephony/client.py @@ -86,7 +86,7 @@ def list( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -157,8 +157,8 @@ def call( Examples -------- - from agent import AgentClient - from agent.telephony import ( + from shengwang_agent import AgentClient + from shengwang_agent.telephony import ( CallTelephonyRequestProperties, CallTelephonyRequestSip, ) @@ -215,7 +215,7 @@ def get( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -254,7 +254,7 @@ def hangup( Examples -------- - from agent import AgentClient + from shengwang_agent import AgentClient client = AgentClient( authorization="YOUR_AUTHORIZATION", @@ -339,7 +339,7 @@ async def list( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -419,8 +419,8 @@ async def call( -------- import asyncio - from agent import AsyncAgentClient - from agent.telephony import ( + from shengwang_agent import AsyncAgentClient + from shengwang_agent.telephony import ( CallTelephonyRequestProperties, CallTelephonyRequestSip, ) @@ -485,7 +485,7 @@ async def get( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", @@ -532,7 +532,7 @@ async def hangup( -------- import asyncio - from agent import AsyncAgentClient + from shengwang_agent import AsyncAgentClient client = AsyncAgentClient( authorization="YOUR_AUTHORIZATION", diff --git a/src/agent/telephony/raw_client.py b/src/shengwang_agent/telephony/raw_client.py similarity index 100% rename from src/agent/telephony/raw_client.py rename to src/shengwang_agent/telephony/raw_client.py diff --git a/src/agent/telephony/types/__init__.py b/src/shengwang_agent/telephony/types/__init__.py similarity index 100% rename from src/agent/telephony/types/__init__.py rename to src/shengwang_agent/telephony/types/__init__.py diff --git a/src/agent/telephony/types/call_telephony_request_properties.py b/src/shengwang_agent/telephony/types/call_telephony_request_properties.py similarity index 100% rename from src/agent/telephony/types/call_telephony_request_properties.py rename to src/shengwang_agent/telephony/types/call_telephony_request_properties.py diff --git a/src/agent/telephony/types/call_telephony_request_sip.py b/src/shengwang_agent/telephony/types/call_telephony_request_sip.py similarity index 100% rename from src/agent/telephony/types/call_telephony_request_sip.py rename to src/shengwang_agent/telephony/types/call_telephony_request_sip.py diff --git a/src/agent/telephony/types/call_telephony_response.py b/src/shengwang_agent/telephony/types/call_telephony_response.py similarity index 100% rename from src/agent/telephony/types/call_telephony_response.py rename to src/shengwang_agent/telephony/types/call_telephony_response.py diff --git a/src/agent/telephony/types/get_telephony_response.py b/src/shengwang_agent/telephony/types/get_telephony_response.py similarity index 100% rename from src/agent/telephony/types/get_telephony_response.py rename to src/shengwang_agent/telephony/types/get_telephony_response.py diff --git a/src/agent/telephony/types/get_telephony_response_reason.py b/src/shengwang_agent/telephony/types/get_telephony_response_reason.py similarity index 100% rename from src/agent/telephony/types/get_telephony_response_reason.py rename to src/shengwang_agent/telephony/types/get_telephony_response_reason.py diff --git a/src/agent/telephony/types/get_telephony_response_state.py b/src/shengwang_agent/telephony/types/get_telephony_response_state.py similarity index 100% rename from src/agent/telephony/types/get_telephony_response_state.py rename to src/shengwang_agent/telephony/types/get_telephony_response_state.py diff --git a/src/agent/telephony/types/get_telephony_response_type.py b/src/shengwang_agent/telephony/types/get_telephony_response_type.py similarity index 100% rename from src/agent/telephony/types/get_telephony_response_type.py rename to src/shengwang_agent/telephony/types/get_telephony_response_type.py diff --git a/src/agent/telephony/types/hangup_telephony_response.py b/src/shengwang_agent/telephony/types/hangup_telephony_response.py similarity index 100% rename from src/agent/telephony/types/hangup_telephony_response.py rename to src/shengwang_agent/telephony/types/hangup_telephony_response.py diff --git a/src/agent/telephony/types/list_telephony_request_type.py b/src/shengwang_agent/telephony/types/list_telephony_request_type.py similarity index 100% rename from src/agent/telephony/types/list_telephony_request_type.py rename to src/shengwang_agent/telephony/types/list_telephony_request_type.py diff --git a/src/agent/telephony/types/list_telephony_response.py b/src/shengwang_agent/telephony/types/list_telephony_response.py similarity index 100% rename from src/agent/telephony/types/list_telephony_response.py rename to src/shengwang_agent/telephony/types/list_telephony_response.py diff --git a/src/agent/telephony/types/list_telephony_response_data.py b/src/shengwang_agent/telephony/types/list_telephony_response_data.py similarity index 100% rename from src/agent/telephony/types/list_telephony_response_data.py rename to src/shengwang_agent/telephony/types/list_telephony_response_data.py diff --git a/src/agent/telephony/types/list_telephony_response_data_list_item.py b/src/shengwang_agent/telephony/types/list_telephony_response_data_list_item.py similarity index 100% rename from src/agent/telephony/types/list_telephony_response_data_list_item.py rename to src/shengwang_agent/telephony/types/list_telephony_response_data_list_item.py diff --git a/src/agent/telephony/types/list_telephony_response_data_list_item_state.py b/src/shengwang_agent/telephony/types/list_telephony_response_data_list_item_state.py similarity index 100% rename from src/agent/telephony/types/list_telephony_response_data_list_item_state.py rename to src/shengwang_agent/telephony/types/list_telephony_response_data_list_item_state.py diff --git a/src/agent/telephony/types/list_telephony_response_data_list_item_type.py b/src/shengwang_agent/telephony/types/list_telephony_response_data_list_item_type.py similarity index 100% rename from src/agent/telephony/types/list_telephony_response_data_list_item_type.py rename to src/shengwang_agent/telephony/types/list_telephony_response_data_list_item_type.py diff --git a/src/agent/telephony/types/list_telephony_response_meta.py b/src/shengwang_agent/telephony/types/list_telephony_response_meta.py similarity index 100% rename from src/agent/telephony/types/list_telephony_response_meta.py rename to src/shengwang_agent/telephony/types/list_telephony_response_meta.py diff --git a/src/agent/types/__init__.py b/src/shengwang_agent/types/__init__.py similarity index 100% rename from src/agent/types/__init__.py rename to src/shengwang_agent/types/__init__.py diff --git a/src/agent/types/amazon_tts.py b/src/shengwang_agent/types/amazon_tts.py similarity index 100% rename from src/agent/types/amazon_tts.py rename to src/shengwang_agent/types/amazon_tts.py diff --git a/src/agent/types/amazon_tts_params.py b/src/shengwang_agent/types/amazon_tts_params.py similarity index 100% rename from src/agent/types/amazon_tts_params.py rename to src/shengwang_agent/types/amazon_tts_params.py diff --git a/src/agent/types/cartesia_tts.py b/src/shengwang_agent/types/cartesia_tts.py similarity index 100% rename from src/agent/types/cartesia_tts.py rename to src/shengwang_agent/types/cartesia_tts.py diff --git a/src/agent/types/cartesia_tts_params.py b/src/shengwang_agent/types/cartesia_tts_params.py similarity index 100% rename from src/agent/types/cartesia_tts_params.py rename to src/shengwang_agent/types/cartesia_tts_params.py diff --git a/src/agent/types/eleven_labs_tts.py b/src/shengwang_agent/types/eleven_labs_tts.py similarity index 100% rename from src/agent/types/eleven_labs_tts.py rename to src/shengwang_agent/types/eleven_labs_tts.py diff --git a/src/agent/types/eleven_labs_tts_params.py b/src/shengwang_agent/types/eleven_labs_tts_params.py similarity index 100% rename from src/agent/types/eleven_labs_tts_params.py rename to src/shengwang_agent/types/eleven_labs_tts_params.py diff --git a/src/agent/types/fish_audio_tts.py b/src/shengwang_agent/types/fish_audio_tts.py similarity index 100% rename from src/agent/types/fish_audio_tts.py rename to src/shengwang_agent/types/fish_audio_tts.py diff --git a/src/agent/types/fish_audio_tts_params.py b/src/shengwang_agent/types/fish_audio_tts_params.py similarity index 100% rename from src/agent/types/fish_audio_tts_params.py rename to src/shengwang_agent/types/fish_audio_tts_params.py diff --git a/src/agent/types/google_tts.py b/src/shengwang_agent/types/google_tts.py similarity index 100% rename from src/agent/types/google_tts.py rename to src/shengwang_agent/types/google_tts.py diff --git a/src/agent/types/google_tts_params.py b/src/shengwang_agent/types/google_tts_params.py similarity index 100% rename from src/agent/types/google_tts_params.py rename to src/shengwang_agent/types/google_tts_params.py diff --git a/src/agent/types/hume_ai_tts.py b/src/shengwang_agent/types/hume_ai_tts.py similarity index 100% rename from src/agent/types/hume_ai_tts.py rename to src/shengwang_agent/types/hume_ai_tts.py diff --git a/src/agent/types/hume_ai_tts_params.py b/src/shengwang_agent/types/hume_ai_tts_params.py similarity index 100% rename from src/agent/types/hume_ai_tts_params.py rename to src/shengwang_agent/types/hume_ai_tts_params.py diff --git a/src/agent/types/microsoft_tts.py b/src/shengwang_agent/types/microsoft_tts.py similarity index 100% rename from src/agent/types/microsoft_tts.py rename to src/shengwang_agent/types/microsoft_tts.py diff --git a/src/agent/types/microsoft_tts_params.py b/src/shengwang_agent/types/microsoft_tts_params.py similarity index 100% rename from src/agent/types/microsoft_tts_params.py rename to src/shengwang_agent/types/microsoft_tts_params.py diff --git a/src/agent/types/minimax_tts.py b/src/shengwang_agent/types/minimax_tts.py similarity index 100% rename from src/agent/types/minimax_tts.py rename to src/shengwang_agent/types/minimax_tts.py diff --git a/src/agent/types/minimax_tts_params.py b/src/shengwang_agent/types/minimax_tts_params.py similarity index 100% rename from src/agent/types/minimax_tts_params.py rename to src/shengwang_agent/types/minimax_tts_params.py diff --git a/src/agent/types/minimax_tts_params_voice_setting.py b/src/shengwang_agent/types/minimax_tts_params_voice_setting.py similarity index 100% rename from src/agent/types/minimax_tts_params_voice_setting.py rename to src/shengwang_agent/types/minimax_tts_params_voice_setting.py diff --git a/src/agent/types/murf_tts.py b/src/shengwang_agent/types/murf_tts.py similarity index 100% rename from src/agent/types/murf_tts.py rename to src/shengwang_agent/types/murf_tts.py diff --git a/src/agent/types/murf_tts_params.py b/src/shengwang_agent/types/murf_tts_params.py similarity index 100% rename from src/agent/types/murf_tts_params.py rename to src/shengwang_agent/types/murf_tts_params.py diff --git a/src/agent/types/open_ai_tts.py b/src/shengwang_agent/types/open_ai_tts.py similarity index 100% rename from src/agent/types/open_ai_tts.py rename to src/shengwang_agent/types/open_ai_tts.py diff --git a/src/agent/types/open_ai_tts_params.py b/src/shengwang_agent/types/open_ai_tts_params.py similarity index 100% rename from src/agent/types/open_ai_tts_params.py rename to src/shengwang_agent/types/open_ai_tts_params.py diff --git a/src/agent/types/rime_tts.py b/src/shengwang_agent/types/rime_tts.py similarity index 100% rename from src/agent/types/rime_tts.py rename to src/shengwang_agent/types/rime_tts.py diff --git a/src/agent/types/rime_tts_params.py b/src/shengwang_agent/types/rime_tts_params.py similarity index 100% rename from src/agent/types/rime_tts_params.py rename to src/shengwang_agent/types/rime_tts_params.py diff --git a/src/agent/types/sarvam_tts.py b/src/shengwang_agent/types/sarvam_tts.py similarity index 100% rename from src/agent/types/sarvam_tts.py rename to src/shengwang_agent/types/sarvam_tts.py diff --git a/src/agent/types/sarvam_tts_params.py b/src/shengwang_agent/types/sarvam_tts_params.py similarity index 100% rename from src/agent/types/sarvam_tts_params.py rename to src/shengwang_agent/types/sarvam_tts_params.py diff --git a/src/agent/types/tts.py b/src/shengwang_agent/types/tts.py similarity index 100% rename from src/agent/types/tts.py rename to src/shengwang_agent/types/tts.py diff --git a/src/agent/version.py b/src/shengwang_agent/version.py similarity index 100% rename from src/agent/version.py rename to src/shengwang_agent/version.py diff --git a/tests/utils/assets/models/circle.py b/tests/utils/assets/models/circle.py index 9e50019..48906c0 100644 --- a/tests/utils/assets/models/circle.py +++ b/tests/utils/assets/models/circle.py @@ -4,7 +4,7 @@ import typing_extensions -from agent.core.serialization import FieldMetadata +from shengwang_agent.core.serialization import FieldMetadata class CircleParams(typing_extensions.TypedDict): diff --git a/tests/utils/assets/models/object_with_optional_field.py b/tests/utils/assets/models/object_with_optional_field.py index f96fe85..2596572 100644 --- a/tests/utils/assets/models/object_with_optional_field.py +++ b/tests/utils/assets/models/object_with_optional_field.py @@ -11,7 +11,7 @@ from .shape import ShapeParams from .undiscriminated_shape import UndiscriminatedShapeParams -from agent.core.serialization import FieldMetadata +from shengwang_agent.core.serialization import FieldMetadata class ObjectWithOptionalFieldParams(typing_extensions.TypedDict): diff --git a/tests/utils/assets/models/shape.py b/tests/utils/assets/models/shape.py index fff6a27..e9215fe 100644 --- a/tests/utils/assets/models/shape.py +++ b/tests/utils/assets/models/shape.py @@ -8,7 +8,7 @@ import typing_extensions -from agent.core.serialization import FieldMetadata +from shengwang_agent.core.serialization import FieldMetadata class Base(typing_extensions.TypedDict): diff --git a/tests/utils/assets/models/square.py b/tests/utils/assets/models/square.py index 67846b3..d3420d7 100644 --- a/tests/utils/assets/models/square.py +++ b/tests/utils/assets/models/square.py @@ -4,7 +4,7 @@ import typing_extensions -from agent.core.serialization import FieldMetadata +from shengwang_agent.core.serialization import FieldMetadata class SquareParams(typing_extensions.TypedDict): diff --git a/tests/utils/test_http_client.py b/tests/utils/test_http_client.py index 1279e70..593e1f4 100644 --- a/tests/utils/test_http_client.py +++ b/tests/utils/test_http_client.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from agent.core.http_client import get_request_body -from agent.core.request_options import RequestOptions +from shengwang_agent.core.http_client import get_request_body +from shengwang_agent.core.request_options import RequestOptions def get_request_options() -> RequestOptions: diff --git a/tests/utils/test_query_encoding.py b/tests/utils/test_query_encoding.py index 0c74f51..df5cea8 100644 --- a/tests/utils/test_query_encoding.py +++ b/tests/utils/test_query_encoding.py @@ -1,6 +1,6 @@ # This file was auto-generated by Fern from our API Definition. -from agent.core.query_encoder import encode_query +from shengwang_agent.core.query_encoder import encode_query def test_query_encoding_deep_objects() -> None: diff --git a/tests/utils/test_serialization.py b/tests/utils/test_serialization.py index a8f0e2f..d740bca 100644 --- a/tests/utils/test_serialization.py +++ b/tests/utils/test_serialization.py @@ -4,7 +4,7 @@ from .assets.models import ObjectWithOptionalFieldParams, ShapeParams -from agent.core.serialization import convert_and_respect_annotation_metadata +from shengwang_agent.core.serialization import convert_and_respect_annotation_metadata UNION_TEST: ShapeParams = {"radius_measurement": 1.0, "shape_type": "circle", "id": "1"} UNION_TEST_CONVERTED = {"shapeType": "circle", "radiusMeasurement": 1.0, "id": "1"}