Does the api call support native apis? #767

Closed
opened 2026-02-21 17:28:20 -05:00 by yindo · 10 comments
Owner

Originally created by @xiaolibuzai-ovo on GitHub (Dec 3, 2023).

Provide a description of requested docs changes

I am sorry for asking this question, because he has troubled me. I hope you can help me🥹

For example, if I create a conversation app and its api seems to be wrapped, can I call it in a format similar to gpt's native api? For example, to specify dialog roles (system, user, assistant), the api provided by dify contains wrappers for contextual dialog data, right?
image
For example, the chat api in this picture, I want to use a native api like chatgpt
image
My model is a self-deployed llama2 extension, and a Chatgpt-like api format is supported because I've used other webui apis

Originally created by @xiaolibuzai-ovo on GitHub (Dec 3, 2023). ### Provide a description of requested docs changes I am sorry for asking this question, because he has troubled me. I hope you can help me🥹 For example, if I create a conversation app and its api seems to be wrapped, can I call it in a format similar to gpt's native api? For example, to specify dialog roles (system, user, assistant), the api provided by dify contains wrappers for contextual dialog data, right? <img width="1098" alt="image" src="https://github.com/langgenius/dify/assets/96616876/50ccbdc1-6823-49c3-a102-37dd65be5073"> For example, the chat api in this picture, I want to use a native api like chatgpt <img width="896" alt="image" src="https://github.com/langgenius/dify/assets/96616876/62f14c14-4341-4baa-bf5e-5291bee67a9a"> My model is a self-deployed llama2 extension, and a Chatgpt-like api format is supported because I've used other webui apis
yindo closed this issue 2026-02-21 17:28:20 -05:00
Author
Owner

@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023):

image prompt choreography allows you to set dialog context data. Is this supported in the api? I wanted to maintain the chat context myself through the api
@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023): <img width="600" alt="image" src="https://github.com/langgenius/dify/assets/96616876/5d857b42-7376-4623-8f20-2b8eab7eecda"> prompt choreography allows you to set dialog context data. Is this supported in the api? I wanted to maintain the chat context myself through the api
Author
Owner

@Adarsbhi126 commented on GitHub (Dec 3, 2023):

how to set together ai ??

@Adarsbhi126 commented on GitHub (Dec 3, 2023): how to set together ai ??
Author
Owner

@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023):

how to set together ai ??

Are you asking me how I set ai? Use Xinference

@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023): > how to set together ai ?? Are you asking me how I set ai? Use Xinference
Author
Owner

@Adarsbhi126 commented on GitHub (Dec 3, 2023):

sorryfor my english! im not good in english but i means i want to know how i set together ai api _ new project model like replicate but low price 4 time lower than gpt 3.5 turbo and 4x time faster than gpt 4

@Adarsbhi126 commented on GitHub (Dec 3, 2023): sorryfor my english! im not good in english but i means i want to know how i set together ai api _ new project model like replicate but low price 4 time lower than gpt 3.5 turbo and 4x time faster than gpt 4
Author
Owner

@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023):

sorryfor my english! im not good in english but i means i want to know how i set together ai api _ new project model like replicate but low price 4 time lower than gpt 3.5 turbo and 4x time faster than gpt 4

emmm 或许我们可以中文交流

@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023): > sorryfor my english! im not good in english but i means i want to know how i set together ai api _ new project model like replicate but low price 4 time lower than gpt 3.5 turbo and 4x time faster than gpt 4 emmm 或许我们可以中文交流
Author
Owner

@Adarsbhi126 commented on GitHub (Dec 3, 2023):

https://www.together.ai/

@Adarsbhi126 commented on GitHub (Dec 3, 2023): https://www.together.ai/
Author
Owner

@Adarsbhi126 commented on GitHub (Dec 3, 2023):

hehe i donts know chinese buddy, sorry :(

@Adarsbhi126 commented on GitHub (Dec 3, 2023): hehe i donts know chinese buddy, sorry :(
Author
Owner

@Adarsbhi126 commented on GitHub (Dec 3, 2023):

i dont know how i set this, can you please guild me ??

@Adarsbhi126 commented on GitHub (Dec 3, 2023): i dont know how i set this, can you please guild me ??
Author
Owner

@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023):

i dont know how i set this, can you please guild me ??

sry, We don't seem to be talking about the same thing, and I'm also asking for help from a member of the repo

@xiaolibuzai-ovo commented on GitHub (Dec 3, 2023): > i dont know how i set this, can you please guild me ?? sry, We don't seem to be talking about the same thing, and I'm also asking for help from a member of the repo
Author
Owner

@crazywoola commented on GitHub (Dec 3, 2023):

The api for an application is indeed wrapped by design. Because we are not only supporting openai but also other providers like qwen, spark, wenxin, xinference. They are slightly different comparing to each other. That's why it's wrapped, so that you don't need to worry about the system, user, assistant things.

@crazywoola commented on GitHub (Dec 3, 2023): The api for an application is indeed wrapped by design. Because we are not only supporting openai but also other providers like qwen, spark, wenxin, xinference. They are slightly different comparing to each other. That's why it's wrapped, so that you don't need to worry about the system, user, assistant things.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#767