-
Notifications
You must be signed in to change notification settings - Fork 47
[ISSUE #216] Support chatGPT source connector #215
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
Conversation
| - `connectorName`, name of the connector. | ||
| - (required) `path`, path of the API. | ||
| - (required) `port`, port of the API. | ||
| - `idleTimeout`, idle TCP connection timeout in seconds. A connection will timeout and be closed if no data is received nor sent within the `idleTimeout` seconds. The default is 0, which means don't timeout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value is 30 in your code. Why "The default is 0, which means don't timeout"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because, when I was writing the document, I downloaded the source code and the comment said "Zero means don't timeout" before I had time to modify the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is more appropriate to default to not timeout
| - `connectorConfig` | ||
| - `connectorName`, name of the connector. | ||
| - (required) `path`, path of the API. | ||
| - (required) `port`, port of the API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you have added default values to these 2 items in your latest revision. Why "required"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I don’t want users to use the default values in the code, because I don’t know why there is no value in the yml. I prefer users to specify the configuration in the yml instead of using a black box. But your idea is also very good Logically speaking, since I didn't choose to throw an exception, it really shouldn't be "required"
| - `parsePromptFileName`, parse prompt template required by the user to use the parse request, default to the "prompt" file in the resource folder. | ||
| - `openaiConfig` | ||
| - (required) `token`, token of the openai | ||
| - (required) `model`, model of the openai |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value is gpt-3.5-turbo in your code. Why "(required)"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as above
| "fields": "gift:Was the item purchased as a gift for someone else? Answer True if yes, False if not or unknown;delivery_days:How many days did it take for the product to arrive? If this information is not found, output -1;price_value:Extract any sentences about the value or price, and output them as a comma separated Python list" | ||
| }' | ||
| ``` | ||
| if `datacontenttype` is `application/json`, `cloudevent.data` is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the cloudevent.data that pops up here, please explain to the user what it is, e.g. it's "the key part of the results that Connector will get from ChatGPT", or some other better description of your own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea~ , yours is better
| "source": "/mycontext", | ||
| "subject":"test_topic", | ||
| "datacontenttype":"text/plain", | ||
| "text": "you want to talk to ChatGPT about " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add "required" to the required fields here. The same applies to PARSE below.
|
It may be better to create a new issue in this repo and link it to this PR. |
yep~ |
Fixes #216
chatgpt connector doc