-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support chatGPT source connector #4047
Comments
I am confused. How can ChatGPT provide the function of Source? I always feel that Source is at least one form of storage. |
use the openai sdk in the chatgpt-source-connector, which likes an http server receive the request and using the openai sdk send to chatgpt service, then get response convert to cloudevents. |
I want to try .
|
It's not a good idea to let GPT3.5 generate any fixed data structure. |
@Pil0tXia Ok Thank you. I understand what you mean. I will continue to improve prompt and convert any input of the user into the result of cloudevents specification, instead of just limiting it to fixed. |
@Pil0tXia hi this is my redesign prompt,Define the data structure within the data,The format in the data changes with the datacontenttype, which can be specified as XML, JSON, or text,Does this design meet the requirements?
result: {
"specversion": "1.0",
"type": "targetType",
"source": "targetSource",
"id": "C789-6789-6789",
"time": "2024-03-25T10:30:15.000Z",
"datacontenttype": "application/json",
"data": {
"orderNo": "11221122",
"address": "天津门店",
"phone": "13356288979"
}
} |
Actually, you don't need to ask GPT to return data in JSON format. What data GPT generates is determined by the user. The GPT source connector only needs to receive the complete response from GPT and wrap it in a CloudEvent. |
Just convert it to data based on user input, and the format is passed by the user. Only a part of the functionality of my prompt is needed, right? Actually, the current data is based on the user-defined datacontenttype, and the attributes in the data are also user-defined.All data in \ \ \ is entered by the user. I should just remove the wrapper of cloudevent, accept the return of GPT in the code, and then set the data |
@Pil0tXia
result:
|
@jevinjiang I don't think you need to define a prompt. The prompt is what the user sends to GPT, and the role of the source connector is to receive GPT's response. |
* [ISSUE #4047] Support chatGPT source connector * [ISSUE #4047] Add OpenAI configuration and adjust DTO * [ISSUE #4047] Join parse request support * [ISSUE #4047] impl Parse request * [ISSUE #4047] fix code style * [ISSUE #4047] fix code style * [ISSUE #4047] fix dependencies check failed * [ISSUE #4047] fix dependencies check * [ISSUE #4047] fix license check * [ISSUE #4047] fix review question * [ISSUE #4047] fix review question * [ISSUE #4047] add default value * [ISSUE #4047] fix test * [ISSUE #4047] default timeout value is zero , not timeout . * [ISSUE #4047] fix review * [ISSUE #4047] fix license check --------- Co-authored-by: JiangShuJu <[email protected]>
Search before asking
Feature Request
We can using openai sdk to support chatGPT source connector.
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: