-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(model): Update Text-Generation Task Schema to Align with OpenAI Standards #243
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tonywang10101
requested review from
donch1989,
heiruwu,
pinglin and
xiaofei-du
as code owners
December 21, 2023 00:59
donch1989
reviewed
Dec 21, 2023
heiruwu
approved these changes
Dec 22, 2023
tonywang10101
added a commit
to instill-ai/model-backend
that referenced
this pull request
Dec 25, 2023
…Standards (#479) Because ... - This update is necessitated by the need to align our current text-generation-task schema more closely with OpenAI's task structure. This commit .. 1. **Enhancement of TASK_TEXT_GENERATION**: Following our discussion in [INS-2982](https://linear.app/instill-ai/issue/INS-2982/harmonizing-the-text-generation-tasks-protocol-buffer-with-the-openai), we have introduced three new fields to the `TASK_TEXT_GENERATION` protocol buffer: - An optional `system_message` string. - An optional `chat_history` field, now mirroring the type used in `conversation`. - An optional `image_url` string, which is a base64 encoded string including batch dimension. 2. **Improved `extra_param` Support**: To offer enhanced functionality for the `extra_param`, we have implemented the suggestions in [INS-2954](https://linear.app/instill-ai/issue/INS-2954/improve-param-value-filed-type). 3. **Protobuf Structure Update**: In line with the recent [commit](instill-ai/protobufs@61c3ca8) to our protobuf repository, we have migrated the `model owner` and `org` fields to a new unified `owner` field, ensuring consistency across our models. Related changes - [protobuf PR](instill-ai/protobufs#243). After this PR merged, we needs to update go mod here - SDK (WIP)
heiruwu
pushed a commit
to instill-ai/python-sdk
that referenced
this pull request
Dec 25, 2023
…Standards (#69) Because ... - This update is necessitated by the need to align our current text-generation-task schema more closely with OpenAI's task structure. This commit .. 1. **Enhancement of TASK_TEXT_GENERATION**: Following our discussion in [INS-2982](https://linear.app/instill-ai/issue/INS-2982/harmonizing-the-text-generation-tasks-protocol-buffer-with-the-openai), we have introduced three new fields to the `TASK_TEXT_GENERATION` protocol buffer: - An optional `system_message` string. - An optional `chat_history` field, now mirroring the type used in `conversation`. - An optional `image_url` string, which is a base64 encoded string including batch dimension. 2. **Improved `extra_param` Support**: To offer enhanced functionality for the `extra_param`, we have implemented the suggestions in [INS-2954](https://linear.app/instill-ai/issue/INS-2954/improve-param-value-filed-type). 3. **Protobuf Structure Update**: In line with the recent [commit](instill-ai/protobufs@61c3ca8) to our protobuf repository, we have migrated the `model owner` and `org` fields to a new unified `owner` field, ensuring consistency across our models. Related changes - [protobuf PR](instill-ai/protobufs#243) - [model backed PR](instill-ai/model-backend#479)
heiruwu
pushed a commit
to instill-ai/python-sdk
that referenced
this pull request
Dec 25, 2023
…Standards (#69) Because ... - This update is necessitated by the need to align our current text-generation-task schema more closely with OpenAI's task structure. This commit .. 1. **Enhancement of TASK_TEXT_GENERATION**: Following our discussion in [INS-2982](https://linear.app/instill-ai/issue/INS-2982/harmonizing-the-text-generation-tasks-protocol-buffer-with-the-openai), we have introduced three new fields to the `TASK_TEXT_GENERATION` protocol buffer: - An optional `system_message` string. - An optional `chat_history` field, now mirroring the type used in `conversation`. - An optional `image_url` string, which is a base64 encoded string including batch dimension. 2. **Improved `extra_param` Support**: To offer enhanced functionality for the `extra_param`, we have implemented the suggestions in [INS-2954](https://linear.app/instill-ai/issue/INS-2954/improve-param-value-filed-type). 3. **Protobuf Structure Update**: In line with the recent [commit](instill-ai/protobufs@61c3ca8) to our protobuf repository, we have migrated the `model owner` and `org` fields to a new unified `owner` field, ensuring consistency across our models. Related changes - [protobuf PR](instill-ai/protobufs#243) - [model backed PR](instill-ai/model-backend#479)
tonywang10101
added a commit
that referenced
this pull request
Dec 29, 2023
…field (#246) Because ... - This update is necessitated by the need to align our current text-generation-task schema more closely with OpenAI's task structure. This commit ... 1. **Enhancement of TASK_TEXT_GENERATION**: Following our discussion in [INS-2982](https://linear.app/instill-ai/issue/INS-2982/harmonizing-the-text-generation-tasks-protocol-buffer-with-the-openai), we have introduced three new fields to the `TASK_TEXT_GENERATION` protocol buffer: - An optional `system_message` string. - An optional `chat_history` field, now mirroring the type used in `conversation`. - An optional `image_url` string, which is a base64 encoded string including batch dimension. 2. **Improved `extra_param` Support**: To offer enhanced functionality for the `extra_param`, we have implemented the suggestions in [INS-2954](https://linear.app/instill-ai/issue/INS-2954/improve-param-value-filed-type). 3. This PR is based on the basis [PR-243](#243) and made some modifications to the `chat_history` field to align with the OpenAI message field Based on information provided by Xiaofei, following are patterns of OpenAI `message` field: ``` [ { "role": "...", // user, system, assistant "content": [...] } ] ``` And inside content: If it is a text ``` { "type": "text", "text": "What's in this image?" }, ``` if it is an image ``` { "type": "image_url", "image_url": { "url": "< url or base64 >" } } ``` reference to [this slack thread](https://instill-ai.slack.com/archives/C016F66FX9Q/p1703830216129909?thread_ts=1703822336.034739&cid=C016F66FX9Q) to get more informations --------- Co-authored-by: droplet-bot <[email protected]>
heiruwu
pushed a commit
to instill-ai/python-sdk
that referenced
this pull request
Jan 4, 2024
Because ... - This update is necessitated by the need to align our current text-generation-task schema more closely with OpenAI's task structure. This commit ... 1. **Enhancement of TASK_TEXT_GENERATION**: Following our discussion in [INS-2982](https://linear.app/instill-ai/issue/INS-2982/harmonizing-the-text-generation-tasks-protocol-buffer-with-the-openai), we have introduced three new fields to the `TASK_TEXT_GENERATION` protocol buffer: - An optional `system_message` string. - An optional `chat_history` field, now mirroring the type used in `conversation`. - An optional `image_url` string, which is a base64 encoded string including batch dimension. 2. **Improved `extra_param` Support**: To offer enhanced functionality for the `extra_param`, we have implemented the suggestions in [INS-2954](https://linear.app/instill-ai/issue/INS-2954/improve-param-value-filed-type). 3. This PR is based on the basis [PR-243](instill-ai/protobufs#243) and made some modifications to the `chat_history` field to align with the OpenAI message field Based on information provided by Xiaofei, following are patterns of OpenAI `message` field: ``` [ { "role": "...", // user, system, assistant "content": [...] } ] ``` And inside content: If it is a text ``` { "type": "text", "text": "What's in this image?" }, ``` if it is an image ``` { "type": "image_url", "image_url": { "url": "< url or base64 >" } } ``` reference to [this slack thread](https://instill-ai.slack.com/archives/C016F66FX9Q/p1703830216129909?thread_ts=1703822336.034739&cid=C016F66FX9Q) to get more informations
heiruwu
pushed a commit
to instill-ai/model-backend
that referenced
this pull request
Jan 8, 2024
… field (#481) Because ... - This update is necessitated by the need to align our current text-generation-task schema more closely with OpenAI's task structure. This commit ... 1. **Enhancement of TASK_TEXT_GENERATION**: Following our discussion in [INS-2982](https://linear.app/instill-ai/issue/INS-2982/harmonizing-the-text-generation-tasks-protocol-buffer-with-the-openai), we have introduced three new fields to the `TASK_TEXT_GENERATION` protocol buffer: - An optional `system_message` string. - An optional `chat_history` field, now mirroring the type used in `conversation`. - An optional `image_url` string, which is a base64 encoded string including batch dimension. 2. **Improved `extra_param` Support**: To offer enhanced functionality for the `extra_param`, we have implemented the suggestions in [INS-2954](https://linear.app/instill-ai/issue/INS-2954/improve-param-value-filed-type). 3. This PR is based on the basis [PR-243](instill-ai/protobufs#243) and made some modifications to the `chat_history` field to align with the OpenAI message field Based on information provided by Xiaofei, following are patterns of OpenAI `message` field: ``` [ { "role": "...", // user, system, assistant "content": [...] } ] ``` And inside content: If it is a text ``` { "type": "text", "text": "What's in this image?" }, ``` if it is an image ``` { "type": "image_url", "image_url": { "url": "< url or base64 >" } } ``` reference to [this slack thread](https://instill-ai.slack.com/archives/C016F66FX9Q/p1703830216129909?thread_ts=1703822336.034739&cid=C016F66FX9Q) to get more informations --------- Signed-off-by: tony.wang.10101 <[email protected]> Co-authored-by: Chang, Hui-Tang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because ...
This commit ..
Enhancement of TASK_TEXT_GENERATION: Following our discussion in INS-2982, we have introduced three new fields to the
TASK_TEXT_GENERATION
protocol buffer:system_message
string.chat_history
field, now mirroring the type used inconversation
.image_url
string, which is a base64 encoded string including batch dimension.Improved
extra_param
Support: To offer enhanced functionality for theextra_param
, we have implemented the suggestions in INS-2954.