queerviolet / flex-prompt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flex[prompt]

Large language models have maximum context window—a maximum number of tokens they can receive and produce. You may have noticed this:

Error message showing a model's maximum content length being exceeded

Flex prompt addresses this by fitting your prompt into the model's context window. You provide a flexible prompt template, flex prompt renders it into model input.

Flex prompt does not handle model execution, but integrates well with execution frameworks like LangChain and Haystack.

Check out the intro to flex prompt colab (github link) for usage and examples.

About

License:MIT License


Languages

Language:Python 100.0%