-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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(awel): New MessageConverter and more AWEL operators #1039
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
If you run AWEL file with dev mode, it will show AWEL DAG tree and graph, eg. python examples/awel/data_analyst_assistant.py DAG Tree: HttpTrigger(node_id=1be1aa9a-0ae1-47db-ac44-818a31242d55)
-> PromptTemplateBuilderOperator(node_id=b4156cd3-ca2f-4855-881d-92c194b605f9)
| -> HistoryDynamicPromptBuilderOperator(node_id=50bcf0c0-3da4-4486-8b71-05e44ab680ad)
| -> JoinOperator(node_id=61286112-1c4b-4b80-81ec-4fe662f901e3)
| -> LLMBranchOperator(node_id=0489a3e3-4466-4696-88a6-407d512d00fa)
| -> LLMOperator(node_id=ec336bd2-2a61-46e1-a56d-7609c2e1b725, node_name=llm_task)
| | -> MapOperator(node_id=6a15ac90-43d5-4037-a0c9-0de287e9eb86)
| | -> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
| -> StreamingLLMOperator(node_id=f050449a-a04b-4c76-b178-1e0aff787459, node_name=streaming_llm_task)
| -> OpenAIStreamingOutputOperator(node_id=6c327808-ba77-4bf2-9720-69a55155d1d3)
| -> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
-> MapOperator(node_id=20425277-ef51-4bd7-bd1f-684b4490b699)
| -> ServePreChatHistoryLoadOperator(node_id=e1f647d7-48e6-4448-b8ec-ae05fc04d969)
| -> BufferedConversationMapperOperator(node_id=fa961d16-4eec-4d98-a7fe-7845988f912a)
| -> HistoryDynamicPromptBuilderOperator(node_id=50bcf0c0-3da4-4486-8b71-05e44ab680ad)
| -> JoinOperator(node_id=61286112-1c4b-4b80-81ec-4fe662f901e3)
| -> LLMBranchOperator(node_id=0489a3e3-4466-4696-88a6-407d512d00fa)
| -> LLMOperator(node_id=ec336bd2-2a61-46e1-a56d-7609c2e1b725, node_name=llm_task)
| | -> MapOperator(node_id=6a15ac90-43d5-4037-a0c9-0de287e9eb86)
| | -> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
| -> StreamingLLMOperator(node_id=f050449a-a04b-4c76-b178-1e0aff787459, node_name=streaming_llm_task)
| -> OpenAIStreamingOutputOperator(node_id=6c327808-ba77-4bf2-9720-69a55155d1d3)
| -> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
-> MapOperator(node_id=f9019745-6093-41d6-ab5a-97d788645c2a)
| -> HistoryDynamicPromptBuilderOperator(node_id=50bcf0c0-3da4-4486-8b71-05e44ab680ad)
| -> JoinOperator(node_id=61286112-1c4b-4b80-81ec-4fe662f901e3)
| -> LLMBranchOperator(node_id=0489a3e3-4466-4696-88a6-407d512d00fa)
| -> LLMOperator(node_id=ec336bd2-2a61-46e1-a56d-7609c2e1b725, node_name=llm_task)
| | -> MapOperator(node_id=6a15ac90-43d5-4037-a0c9-0de287e9eb86)
| | -> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
| -> StreamingLLMOperator(node_id=f050449a-a04b-4c76-b178-1e0aff787459, node_name=streaming_llm_task)
| -> OpenAIStreamingOutputOperator(node_id=6c327808-ba77-4bf2-9720-69a55155d1d3)
| -> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
-> JoinOperator(node_id=61286112-1c4b-4b80-81ec-4fe662f901e3)
-> LLMBranchOperator(node_id=0489a3e3-4466-4696-88a6-407d512d00fa)
-> LLMOperator(node_id=ec336bd2-2a61-46e1-a56d-7609c2e1b725, node_name=llm_task)
| -> MapOperator(node_id=6a15ac90-43d5-4037-a0c9-0de287e9eb86)
| -> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
-> StreamingLLMOperator(node_id=f050449a-a04b-4c76-b178-1e0aff787459, node_name=streaming_llm_task)
-> OpenAIStreamingOutputOperator(node_id=6c327808-ba77-4bf2-9720-69a55155d1d3)
-> JoinOperator(node_id=edf31b66-c620-473a-94af-a8f8732fcb06)
Other example python examples/awel/simple_chat_history_example.py DAG Tree HttpTrigger(node_id=b71f0ccc-4539-445e-8d87-1ec5ef6e7e83)
-> MapOperator(node_id=23d11ff8-a1d4-4541-a1ff-adfb0eadd614)
-> ChatHistoryPromptComposerOperator(node_id=3ee4c2af-d625-445b-a0f3-60863404d82e)
-> LLMBranchOperator(node_id=bdc20002-b9e9-4ce8-9211-5aba83f4c16e)
-> LLMOperator(node_id=b4c3fe48-a9d8-4968-a128-df5a6b6edd4c, node_name=llm_task)
| -> MapOperator(node_id=ce768e92-5299-43ab-ac04-09755b5f19e2)
| -> JoinOperator(node_id=f33f239e-90dd-4dd4-bc12-30d6d0912cfb)
-> StreamingLLMOperator(node_id=ca529d57-1bd7-479c-9047-5cb5512ade8e, node_name=streaming_llm_task)
-> OpenAIStreamingOutputOperator(node_id=1952037e-775a-4c9c-a8c3-7ca678f15871)
-> JoinOperator(node_id=f33f239e-90dd-4dd4-bc12-30d6d0912cfb) |
csunny
approved these changes
Jan 7, 2024
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.
Great, LGTM 🚀
The DAG Visualize is cool.
Aries-ckt
approved these changes
Jan 8, 2024
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.
r+
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.
Description
MessageConverter
to support unified model message adaptation.v1
, the new version in the sdk defaults tov2
v1
is previous usage.v2
does not automatically convert messages, you need to useMessageConverter
ChatPromptTemplate
How Has This Been Tested?
make test
examples/sdk
andexamples/awel
Snapshots:
Include snapshots for easier review.
Checklist: