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

model param should be optional for renderPrompt() #339

Open
MichaelDoyle opened this issue Jun 7, 2024 · 1 comment
Open

model param should be optional for renderPrompt() #339

MichaelDoyle opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels

Comments

@MichaelDoyle
Copy link
Member

The prompt config can contain a configured model. We should coalesce the two options. See also #337.

@MichaelDoyle MichaelDoyle added the js label Jun 7, 2024
@MichaelDoyle
Copy link
Member Author

MichaelDoyle commented Jun 7, 2024

I took a closer look at this. I don't actually think model is a supported attribute of a GenerateRequest (which is the return type for a PromptFn). Likely this is a consequence of a typescript limitation, or perhaps we can find a way to tighten this up. Will need to follow up on that.

https://github.com/firebase/genkit/blob/main/js/ai/src/prompt.ts#L28-L30
https://github.com/firebase/genkit/blob/main/js/ai/src/model.ts#L171-L184

It's easy to confuse this with the similarly named GenerateOptions, which is the output of the renderPrompt(...) helper and the input for the generate(...) helper.

cc @AshleyTuring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants