From a63c9e39dbe90117f7aa38995568cab263852766 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Tue, 18 Apr 2023 13:50:18 +0200 Subject: [PATCH] refactor: update general guidelines and req --- src/options/generate/prompt_tasks.py | 0 src/options/generate/templates.py | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 src/options/generate/prompt_tasks.py diff --git a/src/options/generate/prompt_tasks.py b/src/options/generate/prompt_tasks.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/options/generate/templates.py b/src/options/generate/templates.py index 789f898..2104622 100644 --- a/src/options/generate/templates.py +++ b/src/options/generate/templates.py @@ -2,7 +2,12 @@ from langchain import PromptTemplate general_guidelines_string = '''The code you write is production ready. Every file starts with comments describing what the code is doing before the first import. Comments can only be written within code blocks. -Then all imports are listed. It is important to import all modules that could be needed in the Executor code. Always import: from jina import Executor, DocumentArray, Document, requests +Then all imports are listed. It is important to import all modules that could be needed in the Executor code. Always import: +from jina import Executor, DocumentArray, Document, requests +import json +from io import BytesIO +import requests as req + Start from top-level and then fully implement all methods.''' @@ -126,7 +131,7 @@ template_generate_requirements = PromptTemplate.from_template( {code_files_wrapped} -Write the content of the requirements.txt file. Make sure to include pytest. Make sure that jina==3.14.1. +Write the content of the requirements.txt file. Make sure to include pytest. Make sure that jina==3.14.1. Make sure that docarray==0.21.0. All versions are fixed using ~=, ==, <, >, <=, >=. The package versions must not have conflicts. ''' + '\n' + template_code_wrapping_string )