jas3333 / gptchat_pinecone

MIT License
14 stars 1 forks source link

Persona issue #4

Closed revbin closed 1 year ago

revbin commented 1 year ago

Hi

i modified the persona to meet my needs. but some of them is working and some of them not after the last update.

for example for Pentester bot he didn't catch the persona prompt i setup even in the http request i have the right persona ID.

i attached my customs personas js file maybe you want to take look at it.

personas.js.txt main.2dfe6af5.js.map.txt Settings.jsx.txt main.2dfe6af5.js.txt

jas3333 commented 1 year ago

I don't see any issues. Try resetting the conversation when switching personas or they will take some of the previous conversation into account.

revbin commented 1 year ago

hi i already did that . here is screenshot for example. Pentester persona which not work , he should give his persona name unpersona

a woking example with Developer persona

persona

jas3333 commented 1 year ago

Try shortening up the prompt a bit. Copy and paste it into one of the bots and have them summarize it then use the summarized text for the Jack persona.

revbin commented 1 year ago

did that, rewrited Jack prompt and still same issue. before the update was working . i will dig deeper this week what happen .(spent all day today with no clue what happen)

revbin commented 1 year ago

Hi tested this with the old branch before the last updates and its worked without any problem (i attached the modified persona files) used the same modified persona with latest branch update and its does not work .so its not the value of $persona is our problem i think something in new gptController.js file . personas.js.txt

regards

jas3333 commented 1 year ago

It's not the gptController. Add this anywhere inside of the sendQuestion function inside gptController.js:

console.log(`Current Persona: ${personas[req.body.persona].prompt}`)

Then check the server log to see which persona is getting passed to the API.

revbin commented 1 year ago

Hi did your recommendation . and the right prompt sent in HTTP request. but for unknown reasons the API does not recognize his name. personavalid

regards

jas3333 commented 1 year ago

Try setting the temperature to 0 and top_p to 0.7ish. A lower temperature seems to follow the system prompt better.

revbin commented 1 year ago

Hi i reset the chat, opened a new window and its same result. its a weird behavour . personavalid0

revbin commented 1 year ago

i give up ..... you can close this Issue.

jas3333 commented 1 year ago

Well at this point looks like it's also reading the context from the vector DB and mongo. You could try finding and deleting those. I think you can query from the Pinecone website, and for mongo you can get Compass to show your databases.

revbin commented 1 year ago

hi just for record i fixed the problem by changing this in gptController.js

const prompt = `Context: ${messages}\n${conversationInjection} User: ${req.body.promptQuestion}`;

to

const prompt = `Context: ${messages}\n${personas[req.body.persona].name}\n${conversationInjection} User: ${req.body.promptQuestion}`;

regards