langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
46.76k stars 6.61k forks source link

Can the conversational application API add a model_config parameter? #8875

Open andylzming opened 3 hours ago

andylzming commented 3 hours ago

Self Checks

1. Is this request related to a challenge you're experiencing? Tell me about your story.

model_config :{
    "pre_prompt": "假设你叫“智能助手”,你有以下技能:\n- 会聊天\n- 会讲故事\n- 会思考\n- 会讲笑话",
    "prompt_type": "simple",
    "chat_prompt_config": {},
    "completion_prompt_config": {},
    "user_input_form": [],
    "dataset_query_variable": "",
    "opening_statement": "",
    "more_like_this": {
        "enabled": false
    },
    "suggested_questions": [],
    "suggested_questions_after_answer": {
        "enabled": false
    },
    "text_to_speech": {
        "enabled": false,
        "voice": "",
        "language": ""
    },
    "speech_to_text": {
        "enabled": false
    },
    "retriever_resource": {
        "enabled": false
    },
    "sensitive_word_avoidance": {
        "canned_response": "",
        "enabled": false,
        "words": ""
    },
    "agent_mode": {
        "enabled": false,
        "max_iteration": 5,
        "strategy": "function_call",
        "tools": []
    },
    "dataset_configs": {
        "retrieval_model": "single",
        "datasets": {
            "datasets": []
        }
    },
    "file_upload": {
        "image": {
            "enabled": false,
            "number_limits": 3,
            "detail": "high",
            "transfer_methods": [
                "remote_url",
                "local_file"
            ]
        }
    },
    "annotation_reply": {
        "id": "1b09c7dc-9dd2-4681-80ea-b03d3dc940e6",
        "enabled": true,
        "score_threshold": 0.8,
        "embedding_model": {
            "embedding_provider_name": "xinference",
            "embedding_model_name": "custom-text2vec-large-chinese"
        }
    },
    "supportAnnotation": true,
    "appId": "2cddb66d-cf78-4d44-86a3-a2963c2acb10",
    "supportCitationHitInfo": true,
    "model": {
        "provider": "xinference",
        "name": "custom-qwen-chat",
        "mode": "chat",
        "completion_params": {
            "stop": []
        }
    }
}

2. Additional context or comments

No response

3. Can you help us with this feature?

andylzming commented 3 hours ago

The current situation is that the provided pre_prompt and model parameters are not taking effect. There is a suspicion that the conversational application API does not support the model_config parameter.