-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated ParameterizedModelParser run method for handing run_with_depe…
…ndencies parameter (#923) Context: Currently `ParameterizedModelParser` run method utilized `kwargs` to decide if to execute prompt with dependencies or not. This pull request eliminates the usage of `kwargs` and introduces a new optional prameter for `run` method to pass information about running the prompt with dependencies. Closes: #664 Test Plan: - [x] Add a new test that invokes `run` with `run_with_dependencies=True` for a prompt which requires output from another prompt. - [x] Ensure that all the prompts in the hugging face cookbook work.
- Loading branch information
Showing
10 changed files
with
182 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
35 changes: 35 additions & 0 deletions
35
python/tests/aiconfigs/travel_gpt_prompts_with_dependency.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "NYC Trip Planner", | ||
"schema_version": "latest", | ||
"description": "Intrepid explorer with ChatGPT and AIConfig", | ||
|
||
"metadata": { | ||
"parameters": {}, | ||
"models": { | ||
"gpt-3.5-turbo": { | ||
"model": "gpt-3.5-turbo", | ||
"top_p": 1, | ||
"temperature": 1, | ||
"stream": false | ||
} | ||
} | ||
}, | ||
|
||
"prompts": [ | ||
{ | ||
"name": "get_activities", | ||
"input": "Tell me 10 fun attractions to do in {{city}}.", | ||
"metadata": { | ||
"model": "gpt-3.5-turbo" | ||
} | ||
}, | ||
{ | ||
"name": "gen_itinerary", | ||
"input": "Generate an itinerary ordered by {{order_by}} for these activities: {{get_activities.output}}.", | ||
"metadata": { | ||
"model": "gpt-3.5-turbo" | ||
} | ||
} | ||
], | ||
"$schema": "https://json.schemastore.org/aiconfig-1.0" | ||
} |
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
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