mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2026-01-19 21:44:20 +01:00
🧪3️⃣ test: level 3 refinement
This commit is contained in:
@@ -11,7 +11,7 @@ from langchain.chat_models import ChatOpenAI
|
||||
from openai.error import RateLimitError
|
||||
from langchain.schema import HumanMessage, SystemMessage, BaseMessage, AIMessage
|
||||
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
||||
from requests.exceptions import ConnectionError
|
||||
from requests.exceptions import ConnectionError, ChunkedEncodingError
|
||||
from urllib3.exceptions import InvalidChunkLength
|
||||
|
||||
from src.constants import PRICING_GPT4_PROMPT, PRICING_GPT4_GENERATION, PRICING_GPT3_5_TURBO_PROMPT, \
|
||||
@@ -132,7 +132,7 @@ class _GPTConversation:
|
||||
try:
|
||||
response = self._chat(self.messages)
|
||||
break
|
||||
except (ConnectionError, InvalidChunkLength) as e:
|
||||
except (ConnectionError, InvalidChunkLength, ChunkedEncodingError) as e:
|
||||
print('There was a connection error. Retrying...')
|
||||
if i == 9:
|
||||
raise e
|
||||
|
||||
@@ -48,15 +48,16 @@ Your response must exactly match the following block code format (double asteris
|
||||
```
|
||||
|
||||
b)
|
||||
Otherwise you respond with the summarized description.
|
||||
The summarized description must contain all the information mentioned by the client.
|
||||
Otherwise you respond with the detailed description.
|
||||
The detailed description must contain all the information mentioned by the client.
|
||||
Your response must exactly match the following block code format (double asterisks for the file name and triple backticks for the file block):
|
||||
|
||||
**final.json**
|
||||
```json
|
||||
{{
|
||||
"description": "<microservice description here>",
|
||||
"implementation_details": "<additional implementation details here>",
|
||||
"code_samples": "<code samples from the client here>",
|
||||
"documentation_info": "<documentation info here>",
|
||||
"credentials: "<credentials here>"
|
||||
}}
|
||||
```
|
||||
@@ -87,7 +88,8 @@ database access: n/a
|
||||
```json
|
||||
{{
|
||||
"description": "The user inserts a png and gets an svg as response.",
|
||||
"implementation_details": "n/a",
|
||||
"code_samples": "n/a",
|
||||
"documentation_info": "n/a",
|
||||
"credentials: "n/a"
|
||||
}}
|
||||
```
|
||||
|
||||
@@ -383,12 +383,14 @@ Either ask for clarification like this:
|
||||
}}
|
||||
```
|
||||
|
||||
Or write the summarized microservice description and additional implementation details like this:
|
||||
Or write the detailed microservice description all mentioned code samples, documentation info and credentials like this:
|
||||
**final.json**
|
||||
```json
|
||||
{{
|
||||
"description": "<microservice description here>",
|
||||
"implementation_details": "<additional implementation details here>",
|
||||
"example_input_file": "<example input file here if mentioned before otherwise n/a>",
|
||||
"code_samples": "<code samples from the client here>",
|
||||
"documentation_info": "<documentation info here>",
|
||||
"credentials: "<credentials here>"
|
||||
}}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user