This is really exciting!

#1
by bbdby - opened

This is exactly what I have been looking for! Is it possible to run this locally?

I figured out how to run it locally. Going to play with it for a bit and see what results I can get. Very excited about the upcoming features. Thank you making this!

Thanks! Glad you got it working. Are you using the OPENAI version? I've been working on a local version that connects to a local API and it's working fairly well: https://huggingface.co/spaces/mikefish/CharacterMaker/tree/local

How are your results so far? Any feedback is appreciated!

I installed the program locally and it is connected to a local API and running, so far so good. I can run Generate Quick Start and that part works. But it is trying to access open AI and failing for the other functions (Generate Speaking Style and Analyze Personality). I can't figure out how to get my GPT-4 key to work. When I try and enter the key through the gui, nothing happens. I'm looking at how to do it via code but so far I haven't been able to get it to work. Sadly I'm not a coder so it might take me some more research to figure it out. Any tips would be appreciated!

Weird that part of it would work and not the other. They both need the API. You tried putting it inside the code?

What OS are you using? You can also try setting it as an environment variable named OPENAI_API_KEY

On Windows 10. I tried putting the key inside the code and also tried setting the key as an environment variable, but like I said before...not a coder at all, so I imagine it's a mistake on my end and would spit out error code saying I had no OpenAI key. The ideal thing would be if one could insert the key in the UI and press 'set' and it would do everything needed for the challenged (me). Right now I can see from the console that nothing is happening when I press 'set'.

My worry is that if my key doesn't work, then how is the 'generate quick start' working? Is it using your OpenAI account or GPT-3.5 somehow?

I'll have more time to play with things this weekend, but even with only part of the features working it shows a lot of promise!

I wonder if there is something in that version of the code that is looking for the key in two places. When you put in your key and press set it won't give any kind of confirmation. You might have a version that I was testing and is broken.

That said, it won't be using my key (i checked and i don't have any API calls recently)

Are you sure you have GPT-4 API access? You get 3.5 by default but if you don't have access to 4 it won't work. That could explain why the first part works (which uses 3.5)

You can test that by going to line 294 in app.py and changing this part:

response = openai.ChatCompletion.create(
            model="gpt-4-0613",
            messages=[
                {"role": "system", "content": prompt_profile},
                {"role": "user", "content": prompt}
            ])

change to model="gpt-3.5-turbo-0613"

and then relaunch and see if that works.

I'll be around this weekend so if that doesn't work let me know and I'll take a deeper look tomorrow.

Yeah, when I replace the gpt-4 models with the gpt-3.5 in the code everything works. Turns out that even though I'm paying for API, I don't actually have access to GPT-4...only GPT-3.5. I guess a lot of people are having this issue. I just assumed that since I was paying for the API that I would have access. Took reading through forums and going to my 'playground' to see that wasn't the case. I'll check back once I have API access and will experiment with gpt-3.5 in the meantime.

The one major thing I did notice is that in the generated json text, the psych profile info formatting is sometimes off...missing spaces, slightly wonky formatting.
For example in the web UI I have this under psych profile:
MBTI - Enneagram - Instinctual Variant - Tritype - Socionics - SLOAN

MBTI: ISFJ
Enneagram: Type 6w5
Instinctual Variant: self-preservation/sp
Tritype: 621
Socionics: ESI (ISFj)
SLOAN: Reserved - Calm - Organized - Accommodating - Non-Curious

But in the JSON text I have this:
"MBTI - Enneagram - Instinctual Variant - Tritype - Socionics - SLOANMBTI: ISFJEnneagram: Type 6w5Instinctual Variant: self-preservation/spTritype: 621Socionics: ESI (ISFj)SLOAN: Reserved - Calm - Organized - Accommodating - Non-Curious"

I also noticed some slight grammar issues in the speech output as well, but nothing that a little post clean up couldn't fix. Of course perhaps these errors could just be caused by not having GPT-4.

Looking forward to the planned updates. I would say your to do list in nearly perfect! A couple other possible additions I could see being helpful are family and relationship categories. I have seen many characters behaving fairly well and then suddenly making up brothers, sisters, parents, etc. Of course I wish we had unlimited tokens...then I'd throw in backstory summery as well, but you really have to start picking and choosing where to make sacrifices.

Thanks for the work you've put in so far! I've seriously been dreaming about something like this for the past couple of months!

Sign up or log in to comment