What does it take to make a basic ChatGPT-like frontend, with code highlighting, run in sandbox, drop-files, and 'acting' in prompts? Clone away and enjoy. First time poster
Thanks, it is good :) You don’t need the serverside though; you can just call openai apis straight from the client. Makes things easier!
Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
11–20 of 36 posts
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#12But I need an GPT-4 api key for that, right? The normal API keys don't work?
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#13Earlier quoted context omitted.
Thanks, it is good :) You don’t need the serverside though; you can just call openai apis straight from the client. Makes things easier!
If you call the openai API's straight from the FrontEnd, you are likely leaking your api keys to visitors who can then use your api keys (and api key limits) for their own purposes.
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#14What does it take to make a basic ChatGPT-like frontend, with code highlighting, run in sandbox, drop-files, and 'acting' in prompts? Clone away and enjoy. First time poster
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#15But I need an GPT-4 api key for that, right? The normal API keys don't work?
The keys for GPT3 (`GPT-3.5-turbo` is the actual model ID) is the same as for GPT-4. You define the model when you make the request to the API.
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#16Earlier quoted context omitted.
The keys for GPT3 (`GPT-3.5-turbo` is the actual model ID) is the same as for GPT-4. You define the model when you make the request to the API.
Does this work if you only have GPT-4 access via a ChatGPT subscription (ChatGPT Plus)?
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#17Earlier quoted context omitted.
Does this work if you only have GPT-4 access via a ChatGPT subscription (ChatGPT Plus)?
It doesn't. Even if you have ChatGPT Plus, the key you have only supports 3.5 unless you are explicitly given the gpt-4 key.
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#18Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#19Earlier quoted context omitted.
Does this work if you only have GPT-4 access via a ChatGPT subscription (ChatGPT Plus)?
It doesn't. Even if you have ChatGPT Plus, the key you have only supports 3.5 unless you are explicitly given the gpt-4 key.
Re: Show HN: Next.js ChatGPT – Responsive chat application powered by GPT-4
#20What does it take to make a basic ChatGPT-like frontend, with code highlighting, run in sandbox, drop-files, and 'acting' in prompts? Clone away and enjoy. First time poster
What do you mean by “acting”? That it pretends to be a Scientist? Or that it can perform actions (like sending an email or searching the web)? If the latter, do you have more info/docs about it? Didn’t see it on the roadmap.
System prompt:
- You are a text-based AI delegates to other AIs.
- You only respond in JSON with two keys `delegate_to` and `parameters`.
- `delegate_to` defines what other AI you should delegate to.
- `parameters` are parameters to send to that AI.
- Here is the list of possible delegates
- delegate_to: email_ai, parameters: $to $subject $body, used for sending emails
- delegate_to: calendar_ai, parameters: $time, $date, $title, used for creating events in a calendar
- delegate_to: search_ai, parameters: $search-term
- Be creative and helpful.
- Your goal is to take user input and successfully delegate the task you receive from the user to the correct AI.
- Your initial message to the user should welcome them and ask them what you can do for them.
Example conversation: > {"message": "Welcome! I'm your AI assistant. What can I do for you today?"}
> User: Send email to john@example.com asking if he wants to have dinner tonight
{
"delegate_to": "email_ai",
"parameters": {
"to": "john@example.com",
"subject": "Dinner Invitation",
"body": "Hi John, would you like to have dinner together tonight? Let me know your thoughts. Best regards."
}
}
Then you'd make your program read the JSON messages it generates and perform the correct action.