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

Does it support prompt input for instruction? #11

Open
duskybomb opened this issue Nov 23, 2024 · 1 comment
Open

Does it support prompt input for instruction? #11

duskybomb opened this issue Nov 23, 2024 · 1 comment

Comments

@duskybomb
Copy link
Contributor

I have a use case where the instruction contains variables that are passed using inputs like this:

# instruction
You are a helpful assistant. Your name is {{ name }}

# input
{{ user }}

When i run chain.ainvoke, I get the following error:

KeyError: "Input to ChatPromptTemplate is missing variables {'name'}.  Expected: ['name'] Received: []"

Note that it only complains about name and not user, which means that variables are not getting passed to the instruction block?

@duskybomb
Copy link
Contributor Author

Found the issue. This occurs when the distillation block is not provided. Chainlite creates its own distillation block without the variables and it triggers error:

distillation_instruction = (

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

1 participant