You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gpt-engineer should only ask when clarification is really needed. Otherwise it just ads to an already complex prompt.
Current Behavior
It allways asks a bunch of questions even if the information is provided in the prompt.
Failure Information
I tried to make a script that reads a redis database and prints the information in a table. I provided the full information to do the task, but it still asked questions (which could be answered by the info in the prompt). The double-info made the prompt too long and confusing and the output used localhost even if the prompt told it not to. On the otherhand, putting the prompt in chatGPT worked first try.
Failure Logs
Prompt:
Create a Python script that fetches data from a redis database. The key of the hash is usersInfo. The format of the data in the hash is {userId}_{attribute} where the attributes are: [name, last_login, email, chats_count]. You can get the data of the usersInfo with hgetall and you can get all the userIds with the keys * command, each user has a key of the format "user:chat:*". The result of querying the database will be a object where the data is in a list under the key "result".
Use prettytable library to print a table with a row for each user and a column for each attribute.
use fetch to get the data from the databse, it is not hosted in localhost:
fetch("https://big-stag-42761.kv.vercel-storage.com/set/user_1_session/session_token_value", {
headers: {
Authorization: "Bearer ****"
}
}).then(response => response.json())
.then(data => console.log(data));
Output:
Summary of areas that need clarification:
1. The specific Python libraries or modules to use for interacting with the Redis database.
2. The structure of the data fetched from the Redis database.
3. The process of fetching data from the non-localhost database using the provided URL.
4. The use of the 'fetch' function in the context of a Python script.
5. The process of using the 'prettytable' library to print the fetched data.
6. The format of the final output object and how to structure it.
7. The use of the 'Authorization' header in the fetch request.
Clarifying question:
Could you please clarify how to use the 'fetch' function in the context of a Python script, as it seems to be JavaScript syntax?
(answer in text, or "c" to move on)
c
(letting gpt-engineer make its own assumptions)
Assumptions:
1. Since 'fetch' is a JavaScript function, I assume that we will use the 'requests' library in Python to make the HTTP request to the provided URL.
2. The 'Authorization' header will be included in the headers of the 'requests' function in Python.
3. The Redis database can be interacted with using the 'redis' library in Python.
4. The data fetched from the Redis database will be in a dictionary format, where the keys are the userIds and the values are another dictionary with the attributes as keys.
5. The 'prettytable' library in Python will be used to print the fetched data in a tabular format, where each row represents a user and each column represents an attribute.
6. The final output object will be a dictionary with the key 'result' and the value being a list of dictionaries, where each dictionary represents a user's data.
Could you please confirm if these assumptions are correct?
Based on the requirements and assumptions, we will need the following Python files:
1. `main.py`: This is the entry point of the application. It will fetch data from the Redis database and print it in a tabular format using the 'prettytable' library.
2. `requirements.txt`: This file will list all the Python libraries that are required to run the application.
Let's start with the `main.py` file:
...
The text was updated successfully, but these errors were encountered:
lukaspetersson
added
bug
Something isn't working
triage
Interesting but stale issue. Will be close if inactive for 3 more days after label added.
labels
Sep 17, 2023
With #715 I find that it asks questions that it does not need. This PR also addresses #703.
However, the problem of the prompt beeing too complex remains.
New output:
What is the exact structure of the output object? Specifically, how should the data from the database be structured under the "result" key?
(answer in text, or "c" to move on)
it is a list
Nothing to clarify.
First, we need to install the necessary libraries. We will need `requests` for making HTTP requests, `redis` for interacting with the Redis database, and `prettytable` for creating the table. We will specify these in a `requirements.txt` file.
Expected Behavior
gpt-engineer should only ask when clarification is really needed. Otherwise it just ads to an already complex prompt.
Current Behavior
It allways asks a bunch of questions even if the information is provided in the prompt.
Failure Information
I tried to make a script that reads a redis database and prints the information in a table. I provided the full information to do the task, but it still asked questions (which could be answered by the info in the prompt). The double-info made the prompt too long and confusing and the output used localhost even if the prompt told it not to. On the otherhand, putting the prompt in chatGPT worked first try.
Failure Logs
Prompt:
Output:
The text was updated successfully, but these errors were encountered: