Aemon-Algiz / DatesetExtraction

Example code for extracting Q&A datasets from LLM's
74 stars 29 forks source link

Here are some changes to the script, which worked for me #6

Open ACarloGitHub opened 11 months ago

ACarloGitHub commented 11 months ago

I took the liberty of modifying the script because it didn't work for me. It's trivial to write for most people, but I remind all those who are beginners like me: on Text Generation WebUI you must activate the API extensions. In my interface I put "check" in two different rows with "api" written. Below you will find the script that I modified and which seems to work. I don't use Github much, I'm not a programmer, I don't know any programming languages. I just poked my head around the code until I figured it out. I apologize for any confusion or errors. I did my best. I don't know how to upload the .py and right now I don't have time to figure it out. Therefore the python script is in txt format. BookParseModified.txt

JMarshQPK commented 8 months ago

This is the MVP comment! Great additions. My issue is the first (and only) time 'results' is used. I get a KeyError: 'results'. The debugger is making a good point, because 'results' is never defined as anything in the same way 'history' right next to it is. Line with the error: result = response.json()['results'][0]['history']

FemBoxbrawl commented 7 months ago

My question is just how do you even run this script or whatever, because it's not shown in the video.

mdkberry commented 4 months ago

that txt file added some useful tips.

as for the question on running it, you need to run it as python code in a python environment, and you need oobabooga installed and running (That is what the API bit is connecting to). unfortunately the owner hasnt left us much to go on and we have to reverse engineer it to run it.