# Introduction of PromptTemplate and PromptChains \(\#3139\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e45491d2f821b71eaba483657724dbadf564ac15)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e45491d2f821b71eaba483657724dbadf564ac15

Requested commit: e45491d2f821b71eaba483657724dbadf564ac15

Commit: e45491d2f821b71eaba483657724dbadf564ac15

Tree: ce52bbf73160a9587de0a6e7b7a862b344ae3a68

Author: Kyle Caverly

Committer: GitHub

## Message

```
Introduction of PromptTemplate and PromptChains (#3139)

(This PR was written 100% by the Inline Assistant)

This PR brings in new components into our ai and assistant crates namely
PromptTemplate and PromptChains. They offer a new way to generate
prompts that allow for a more flexible and dynamic approach than before.

Release Notes:
- Introduced PromptTemplate: an abstract base for individual parts of
the prompt.
- Added PromptChains: manage multiple PromptTemplates, sort them based
on priority and regulate the output size based on tokens.
- Provided new PromptArguments structure to encapsulate arguments needed
for PromptTemplate.
    - Extended repository_context to include PromptCodeSnippet.
```

## Parents

- [999e9c3d5d7b341ecb48428c4e8cab94b31bce93](https://git.cafe/gitcafe/zed/commit/999e9c3d5d7b341ecb48428c4e8cab94b31bce93?format=markdown)

- [19c2df4822db4731760547f9fea6fe4e810c1115](https://git.cafe/gitcafe/zed/commit/19c2df4822db4731760547f9fea6fe4e810c1115?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e45491d2f821b71eaba483657724dbadf564ac15?format=markdown)
