-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Copilot Chat: Add Transform Output Skill #1453
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
Closed
thomasgobin
wants to merge
12
commits into
microsoft:main
from
thomasgobin:feature/pr-transform-output-skill
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5b2424b
Add Transform Output Skill
thomasgobin 4125433
Update CopilotChatWebApi.csproj
thomasgobin 9feb3a0
Update config.json
thomasgobin 47ebb80
Merge branch 'main' into feature/pr-transform-output-skill
teresaqhoang 023d604
Merge branch 'main' into feature/pr-transform-output-skill
teresaqhoang eac3a57
Update config.json
thomasgobin 9a1c7d4
Merge branch 'main' into feature/pr-transform-output-skill
teresaqhoang c4f73b5
Merge branch 'main' into feature/pr-transform-output-skill
teresaqhoang 15bc7f6
Merge branch 'main' into feature/pr-transform-output-skill
shawncal 1f3ffe7
Remove input variable
thomasgobin ef9f12a
Merge branch 'main' into feature/pr-transform-output-skill
thomasgobin ca582eb
Merge branch 'main' into feature/pr-transform-output-skill
thomasgobin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
34 changes: 34 additions & 0 deletions
34
...t-app/webapi/CopilotChat/Skills/DataTransformationSkills/TransformOutputSkill/config.json
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| { | ||
| "schema": 1, | ||
| "description": "Format or transform context variables for plan functions. Use this method when a function parameter requires a specific format (such as list or JSON string) or transformation (such as filtering or capitalization) that is not already done by another function. If unsure whether a function's output matches a subsequent function's input, use this method.", | ||
| "type": "completion", | ||
| "completion": { | ||
| "max_tokens": 1000, | ||
| "temperature": 0.0, | ||
| "top_p": 0.0, | ||
| "presence_penalty": 0.0, | ||
| "frequency_penalty": 0.0, | ||
| "stop_sequences": [ | ||
| "[END FORMATTEDOUTPUT]" | ||
| ] | ||
| }, | ||
| "input": { | ||
| "parameters": [ | ||
| { | ||
| "name": "rationale", | ||
| "description": "Description of the specific format or transformation that must be applied to inputVariable to respect the requested format or transformation. Must be as precise as possible and can contain examples of the expected result if available", | ||
| "defaultValue": "" | ||
| }, | ||
| { | ||
| "name": "outputFormat", | ||
|
thomasgobin marked this conversation as resolved.
|
||
| "description": "Description of the format of the output. Must be as precized as possible and can contain examples of the expected result if available (it can for example include the specific request format such a the JSON description or an example given in the parameter description of the called function)", | ||
| "defaultValue": "" | ||
| }, | ||
| { | ||
| "name": "inputVariable", | ||
| "description": "Input data, coming from a previous function, that must be formatted or transformed", | ||
| "defaultValue": "" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
24 changes: 24 additions & 0 deletions
24
...-app/webapi/CopilotChat/Skills/DataTransformationSkills/TransformOutputSkill/skprompt.txt
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| A function is composed of parameters, the goal is to apply a transformation or specific formatting to respect the requirement of a parameter function. Considering the description of the transformation or formatting to apply ([RATIONALE] section), format of the expected output ([outputFormat] section) and goal of the global plan ([GOAL] section), format the content of the input ([inputVariable] section) to respect all requirements. | ||
|
|
||
| [START EXAMPLE] | ||
| [START inputVariable] | ||
| Here is the list of Stores: [Paris Saint Sulpice,Paris Auteuil, Cannes] | ||
| [END inputVariable] | ||
| [START outputFormat]Comma separated list of store names (example: Paris Saint Sulpice,Cannes)[END outputFormat] | ||
| [START GOAL]User intent: Please search for black t-shirts made of wool fabric and provide me with their availability at stores located in Paris.[END GOAL] | ||
| [START RATIONALE]Filter the list of stores to only include stores located in Paris[END RATIONALE] | ||
| [START FORMATTEDOUTPUT] | ||
| Paris Saint Sulpice,Paris Auteuil | ||
| [END FORMATTEDOUTPUT] | ||
| [END EXAMPLE] | ||
|
|
||
| Real data start here : | ||
| [START inputVariable] | ||
| {{$inputVariable}} | ||
| [END inputVariable] | ||
| [START outputFormat] | ||
| {{$outputFormat}} | ||
| [END outputFormat] | ||
| [START GOAL]{{$planUserIntent}}[END GOAL] | ||
| [START RATIONALE]{{$rationale}}[END RATIONALE] | ||
| [START FORMATTEDOUTPUT] |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.