Add Dify integration and enhance workflow node specifications
- Introduce new fields `dify_api_url` and `dify_api_key` in `AssistantConfig` for Dify API integration. - Update `requirements.txt` to include `dify-client-python` for Dify SDK support. - Modify `config_resolver` to handle Dify connection information. - Add a new `globalNode` type in workflow specifications to provide unified settings across workflows. - Enhance node specifications with additional constraints and default values for better configuration management. - Update frontend components to support the new `globalNode` type and its properties, improving workflow editor functionality.
This commit is contained in:
@@ -142,7 +142,7 @@ def create_tts(cfg: AssistantConfig):
|
||||
)
|
||||
|
||||
|
||||
def create_realtime_service(cfg: AssistantConfig):
|
||||
def create_realtime_service(cfg: AssistantConfig, *, instructions: str):
|
||||
"""Create a speech-to-speech service that owns STT, LLM, and TTS."""
|
||||
if cfg.realtime_interface_type == "stepfun-realtime":
|
||||
from services.pipecat.stepfun_realtime import StepFunRealtimeService
|
||||
@@ -151,7 +151,7 @@ def create_realtime_service(cfg: AssistantConfig):
|
||||
api_key=_require(cfg.realtime_api_key, "Realtime apiKey"),
|
||||
model=_require(cfg.realtimeModel, "Realtime modelId"),
|
||||
base_url=_require(cfg.realtime_base_url, "Realtime apiUrl"),
|
||||
instructions=cfg.prompt,
|
||||
instructions=instructions,
|
||||
voice=str(cfg.realtime_values.get("voice") or "linjiajiejie"),
|
||||
input_sample_rate=int(
|
||||
cfg.realtime_values.get("inputSampleRate") or 24000
|
||||
|
||||
Reference in New Issue
Block a user