chatgpt-web icon indicating copy to clipboard operation
chatgpt-web copied to clipboard

Is it possible to start a new chat directly from a URL?

Open lazywei opened this issue 1 year ago • 2 comments

Hi,

I know we can go to /#/chat/new to create a new chat, but is it possible to specify some query param, such as

https://niek.github.io/chatgpt-web/#/chat/new/?prompt="Tell me a joke"

so that it creates a new chat, use the given prompt to trigger the first message, return the response, and let the user continue from there?

Asking cuz if this is possible, it might be easier to integrate with some other automatic tools.

Thanks.

lazywei avatar Feb 09 '24 17:02 lazywei

Good idea, would be rather easy to integrate (see https://github.com/Niek/chatgpt-web/blob/main/src/lib/NewChat.svelte).

Niek avatar Feb 10 '24 15:02 Niek

Not too familiar with the codebase so please let me know if this doesn't make sense https://github.com/Niek/chatgpt-web/pull/419

lazywei avatar Feb 10 '24 19:02 lazywei