AI-Functions icon indicating copy to clipboard operation
AI-Functions copied to clipboard

Edited test_1 prompt to pass under gpt-3.5-turbo

Open busse opened this issue 2 years ago • 0 comments

test_1 under gpt-3.5-turbo was failing because the model was returning single quotes instead of the proper double quotes in the JSON:

=-=-=- Running test: test_1 - Generate fake people with model gpt-3.5-turbo -=-=-=
GPT RAW:  [{'name': 'John', 'age': 25},
 {'name': 'Jane', 'age': 32},
 {'name': 'Bob', 'age': 19},
 {'name': 'Alice', 'age': 47}]
Output: [{'name': 'John', 'age': 25},
 {'name': 'Jane', 'age': 32},
 {'name': 'Bob', 'age': 19},
 {'name': 'Alice', 'age': 47}]
Testing if result is a a string...
Testing if result can be parsed as a list of dictionaries...
test_1: FAILED - 

Perhaps it was encountering a similar issue to this post -- single/double quotes are interchangeable in Python, but not JSON: https://stackoverflow.com/questions/4162642/single-vs-double-quotes-in-json

I have made a small edit to the description_string for test_1, reminding GPT that JSON should have double quotes; to help disambiguate Python formatting vs. JSON formatting.

I have edited the README as well.

busse avatar Apr 09 '23 06:04 busse