Skip to content

Commit

Permalink
feat(recipe): add our first recipe Summarize (#2028)
Browse files Browse the repository at this point in the history
* feat: add summary recipe

* test: add summary tests

* docs: move all recipes docs

* docs: add recipes and summarize doc

* docs: update openapi reference

* refactor: split method in two method (summary)

* feat: add initial summarize ui

* feat: add mode explanation

* fix: mypy

* feat: allow to configure async property in summarize

* refactor: move modes to enum and update mode explanations

* docs: fix url

* docs: remove list-llm pages

* docs: remove double header

* fix: summary description
  • Loading branch information
jaluma authored Jul 31, 2024
1 parent 40638a1 commit 8119842
Show file tree
Hide file tree
Showing 13 changed files with 743 additions and 148 deletions.
12 changes: 7 additions & 5 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ navigation:
path: ./docs/pages/ui/gradio.mdx
- page: Alternatives
path: ./docs/pages/ui/alternatives.mdx
# Small code snippet or example of usage to help users
- tab: recipes
layout:
- section: Choice of LLM
- section: Getting started
contents:
- page: Quickstart
path: ./docs/pages/recipes/quickstart.mdx
- section: General use cases
contents:
# TODO: add recipes
- page: List of LLMs
path: ./docs/pages/recipes/list-llm.mdx
- page: Summarize
path: ./docs/pages/recipes/summarize.mdx
# More advanced usage of PrivateGPT, by API
- tab: api-reference
layout:
Expand Down
122 changes: 0 additions & 122 deletions fern/docs/pages/recipes/list-llm.mdx

This file was deleted.

23 changes: 23 additions & 0 deletions fern/docs/pages/recipes/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Recipes

Recipes are predefined use cases that help users solve very specific tasks using PrivateGPT.
They provide a streamlined approach to achieve common goals with the platform, offering both a starting point and inspiration for further exploration.
The main goal of Recipes is to empower the community to create and share solutions, expanding the capabilities of PrivateGPT.

## How to Create a New Recipe

1. **Identify the Task**: Define a specific task or problem that the Recipe will address.
2. **Develop the Solution**: Create a clear and concise guide, including any necessary code snippets or configurations.
3. **Submit a PR**: Fork the PrivateGPT repository, add your Recipe to the appropriate section, and submit a PR for review.

We encourage you to be creative and think outside the box! Your contributions help shape the future of PrivateGPT.

## Available Recipes

<Cards>
<Card
title="Summarize"
icon="fa-solid fa-file-alt"
href="/recipes/general-use-cases/summarize"
/>
</Cards>
20 changes: 20 additions & 0 deletions fern/docs/pages/recipes/summarize.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The Summarize Recipe provides a method to extract concise summaries from ingested documents or texts using PrivateGPT.
This tool is particularly useful for quickly understanding large volumes of information by distilling key points and main ideas.

## Use Case

The primary use case for the `Summarize` tool is to automate the summarization of lengthy documents,
making it easier for users to grasp the essential information without reading through entire texts.
This can be applied in various scenarios, such as summarizing research papers, news articles, or business reports.

## Key Features

1. **Ingestion-compatible**: The user provides the text to be summarized. The text can be directly inputted or retrieved from ingested documents within the system.
2. **Customization**: The summary generation can be influenced by providing specific `instructions` or a `prompt`. These inputs guide the model on how to frame the summary, allowing for customization according to user needs.
3. **Streaming Support**: The tool supports streaming, allowing for real-time summary generation, which can be particularly useful for handling large texts or providing immediate feedback.

## Contributing

If you have ideas for improving the Summarize or want to add new features, feel free to contribute!
You can submit your enhancements via a pull request on our [GitHub repository](https://github.com/zylon-ai/private-gpt).

Loading

0 comments on commit 8119842

Please sign in to comment.