这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
---
title: Storing prompts in GitHub repositories
shortTitle: Store prompts
intro: 'Store prompts directly in your GitHub repositories to leverage automated text summarization and other AI-driven functionalities.'
allowTitleToDifferFromFilename: true
versions:
fpt: '*'
ghec: '*'
---

Prompts can be stored as files directly within {% data variables.product.github %} repositories. This unlocks the ability to view your prompts in an organized UI, share them with non-technical stakeholders, and run seamless iterations and comparisons on adjustments to models and prompts.

## Benefits

* Easy integration with the new suite of AI development tools directly on {% data variables.product.github %}.
* Simple and scalable from simple to complex use cases.
* Uses a widely supported format, compatible with existing tools.

## Supported file format

Store prompts in YAML files.

The file can be located anywhere in your repository, but _must have the extension `.prompt.yml` or `.prompt.yaml`._

Example:

``` yaml copy
name: Text Summarizer
description: Summarizes input text concisely
model: openai/gpt-4o-mini
Expand All @@ -37,7 +10,7 @@ messages:
content: |
Summarize the given text, beginning with "Summary -":
<text>
{% raw %}{{input}}{% endraw %}
{{input}}
</text>
testData:
- input: |
Expand All @@ -48,23 +21,3 @@ evaluators:
- name: Output should start with 'Summary -'
string:
startsWith: 'Summary -'
```

## Prompt structure

Prompts have two key parts:

* **Runtime information** (required)
* Prompt templates (system, user, etc.) using simple {% raw %}`{{variable}}`{% endraw %} placeholders
* **Development information** (optional)
* Human-readable name and description
* Model identifier and parameters
* Sample data for testing and evaluations
* Data describing the evaluators themselves

## Limitations

You cannot store prompts for:

* Complex templating languages
* Proprietary or complex file formats (such as `.ghprompt`, or `.prompty`)
Loading