How can I use a prompt created in my AI Studio library without set up parameters in any code only using apiKey and PrompName or id

For instance I created a prompt at
https://aistudio.google.com/app/prompts/[promptId]
It’s a IT infrastructure specialist with instructions not to answer any question about other subjects"

I Want to use i it in my js code without coding all parameters I set in AI Studio for that one. I would like to set only apiKey and library prompt id or name . Is there any way ?

1 Like

Welcome to the forums!

We used to have an experimental library in LangChain JS that did something like this. But they changed the storage format for AI Studio, so it probably doesn’t work anymore.

But in general, you should be able to download the prompt file that is saved in your Google Drive and parse that.

As far as I know - the library itself does not support this feature.

1 Like

Tks for the answer ! I have no problem when downloading prompt file or sharing with other google user. What I want is using an existing prompt by using aistudio url. For instance, at https://aistudio.google.com/app/prompts/14Pp8XbrXmabihir3yD7PIdcEBVuP8cx1_ plus api Key without sending anything as “system instructions” parameter, in the code.
I have a solution based on assinchronous coding in php by using curl libray. It works as well since I put same system instructions I use in the prompt. But I want to ajust system instructions only in one place in order to point coding to it. So it would be better if using streaming mode pointing to an existing prompt .

1 Like