diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-16 00:56:32 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-16 00:56:32 -0700 |
commit | 1c10aa02009bfb4f1ba2cfbfb459996d25e8ccae (patch) | |
tree | f2f67c4b8adaf434651692648944d1d2ef6f8b9b | |
parent | 5162e4e2fde74a05f9b359c90711f221305ba620 (diff) | |
parent | 7f3fe0c6addc1180c6674cb29f1a6b15e944342d (diff) | |
download | sncontinue-1c10aa02009bfb4f1ba2cfbfb459996d25e8ccae.tar.gz sncontinue-1c10aa02009bfb4f1ba2cfbfb459996d25e8ccae.tar.bz2 sncontinue-1c10aa02009bfb4f1ba2cfbfb459996d25e8ccae.zip |
Merge branch 'main' of https://github.com/continuedev/continue
-rw-r--r-- | continuedev/src/continuedev/libs/llm/openai.py | 8 | ||||
-rw-r--r-- | continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/continuedev/src/continuedev/libs/llm/openai.py b/continuedev/src/continuedev/libs/llm/openai.py index ec285d55..345af7b4 100644 --- a/continuedev/src/continuedev/libs/llm/openai.py +++ b/continuedev/src/continuedev/libs/llm/openai.py @@ -140,15 +140,15 @@ class OpenAI(LLM): "frequency_penalty": 0, "presence_penalty": 0, "stream": False} | kwargs if args["model"] in CHAT_MODELS: - resp = await openai.ChatCompletion.acreate( + resp = (await openai.ChatCompletion.acreate( messages=self.compile_chat_messages(with_history, prompt), **args, - ).choices[0].message.content + )).choices[0].message.content else: - resp = await openai.Completion.acreate( + resp = (await openai.Completion.acreate( prompt=prompt, **args, - ).choices[0].text + )).choices[0].text t2 = time.time() print("Completion time:", t2 - t1) diff --git a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py index 3fba1112..1a756a76 100644 --- a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py +++ b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py @@ -49,7 +49,7 @@ class SetupPipelineStep(Step): - `pip install -r requirements.txt`: Install the Python dependencies for the pipeline"""), name="Setup Python environment") # editing the resource function to call the requested API - resource_function_range = Range.from_shorthand(15, 0, 29, 0) + resource_function_range = Range.from_shorthand(15, 0, 30, 0) await sdk.ide.highlightCode(RangeInFile(filepath=os.path.join(await sdk.ide.getWorkspaceDirectory(), filename), range=resource_function_range), "#ffa50033") # sdk.set_loading_message("Writing code to call the API...") @@ -64,7 +64,7 @@ class SetupPipelineStep(Step): # wait for user to put API key in secrets.toml await sdk.ide.setFileOpen(await sdk.ide.getWorkspaceDirectory() + "/.dlt/secrets.toml") - await sdk.wait_for_user_confirmation("If this service requires an API key, please add it to the `secrets.toml` file and then press `Continue`") + await sdk.wait_for_user_confirmation("If this service requires an API key, please add it to the `secrets.toml` file and then press `Continue`. Otherwise, type '/edit this API does not require an API key'") sdk.context.set("source_name", source_name) |