diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-06-08 17:06:47 -0400 |
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-06-08 17:06:47 -0400 |
| commit | 6f39aeb1064747285a9bf663123beea72ad69a83 (patch) | |
| tree | acc4a5959a1235b703f5d2328e0b2cb65269badd /continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py | |
| parent | 2c151796aa53df2c64024917215b3301fd1ac94d (diff) | |
| download | sncontinue-6f39aeb1064747285a9bf663123beea72ad69a83.tar.gz sncontinue-6f39aeb1064747285a9bf663123beea72ad69a83.tar.bz2 sncontinue-6f39aeb1064747285a9bf663123beea72ad69a83.zip | |
make sdk.models blocking
Diffstat (limited to 'continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py')
| -rw-r--r-- | continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py index 6a2f4aed..6dd9396f 100644 --- a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py +++ b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py @@ -30,7 +30,7 @@ class SetupPipelineStep(Step): async def run(self, sdk: ContinueSDK): sdk.context.set("api_description", self.api_description) - source_name = (await sdk.models.gpt35()).complete( + source_name = sdk.models.gpt35.complete( f"Write a snake_case name for the data source described by {self.api_description}: ").strip() filename = f'{source_name}.py' @@ -92,7 +92,7 @@ class ValidatePipelineStep(Step): if "Traceback" in output or "SyntaxError" in output: output = "Traceback" + output.split("Traceback")[-1] file_content = await sdk.ide.readFile(os.path.join(workspace_dir, filename)) - suggestion = (await sdk.models.gpt35()).complete(dedent(f"""\ + suggestion = sdk.models.gpt35.complete(dedent(f"""\ ```python {file_content} ``` @@ -104,7 +104,7 @@ class ValidatePipelineStep(Step): This is a brief summary of the error followed by a suggestion on how it can be fixed by editing the resource function:""")) - api_documentation_url = (await sdk.models.gpt35()).complete(dedent(f"""\ + api_documentation_url = sdk.models.gpt35.complete(dedent(f"""\ The API I am trying to call is the '{sdk.context.get('api_description')}'. I tried calling it in the @resource function like this: ```python {file_content} |
