dialoqbase icon indicating copy to clipboard operation
dialoqbase copied to clipboard

Apply dify api endpoint

Open hkjang opened this issue 11 months ago • 1 comments

I would like to be able to get chat responses by calling the dify api endpoint in dialoqbase. The dify api url is changeable.

curl --location --request POST 'https://api.dify.ai/v1/completion-messages' \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "inputs": {},
    "response_mode": "streaming",
    "user": "abc-123"
}'

or

curl --location --request POST 'https://api.dify.ai/v1/chat-messages' \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "inputs": {},
    "query": "eh",
    "response_mode": "streaming",
    "conversation_id": "1c7e55fb-1ba2-4e10-81b5-30addcea2276",
    "user": "abc-123"
}'

hkjang avatar Nov 27 '24 22:11 hkjang

Does Dify have an OpenAI-compatible endpoint? I haven't used it yet, but I'll check if it's possible

n4ze3m avatar Nov 28 '24 05:11 n4ze3m