Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of context from PHP code #3

Closed
orlyjamie opened this issue Apr 9, 2023 · 3 comments
Closed

Removal of context from PHP code #3

orlyjamie opened this issue Apr 9, 2023 · 3 comments

Comments

@orlyjamie
Copy link

Hi @unconv I noticed that in the following commit 066c33b you removed the context from the code in favour of using simply $msg as the context.

Was there something wrong with the old way?

How can I best provide context for the PHP app as I want users to be primed with some context.

@unconv
Copy link
Owner

unconv commented Apr 9, 2023

Hi! In that commit I updated the code to use the new ChatGPT API (gpt-3.5-turbo model) instead of the text-davinci-003 model. The ChatGPT API is already primed so that it will answer programming questions formatted with Markdown, just like the real ChatGPT, so I don't need to give it any context in this case.

You can watch me make these changes in this video.

After this commit, you can set a system message in the settings.php file. This will provide context to the chatbot, in case you want it to answer in a specific way. You can watch this video where I make the chatbot create content on a WordPress website to get some ideas as to how you can prime the chatbot.

@orlyjamie
Copy link
Author

Thanks @unconv cleared that up for me!

I have two more questions.

  1. Does this support multiple system messages stacked or in an array?
  2. Have you experimented with fine-tuning? I'd love to be able to select one of my fine-tune models in the settings.php

@unconv
Copy link
Owner

unconv commented Apr 17, 2023

I think there can only be one system message. Not sure why you would like to add more than one, anyway. You can always add more content to the system message.

There does not seem to be much difference between setting a system message and just sending a regular message, though. So you can change the style of answer also by your own messages (which is also why you need to worry about "prompt injection")

I haven't tried fine-tuning yet, but it does sound interesting. When I do, I might add a possibility to use the fine-tuning models in the settings. Good suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants