Skip to content

Commit

Permalink
add layout templates, fix basepath url,
Browse files Browse the repository at this point in the history
  • Loading branch information
ksopyla committed Dec 22, 2023
1 parent 6565481 commit abf7e31
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title_separator : "-"
subtitle : "LLM Proxy"
description: &description "LLM's proxy for prompt and response governance, monitoring, and analysis"
url: https://promptsail.github.io/prompt_sail/
baseurl : "/minimal-mistakes" # the subpath of your site, e.g. "/blog"
baseurl : "/prompt_sail" # the subpath of your site, e.g. "/blog"
repository : "mmistakes/minimal-mistakes"
teaser : # path of fallback teaser image, e.g. "/assets/images/500x300.png"
logo : # path of logo image to display in the masthead, e.g. "/assets/images/88x88.png"
Expand Down
70 changes: 68 additions & 2 deletions docs/_docs/01-quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,72 @@ redirect_from:
toc: true
---

## Quick-Start Guide

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis nec aliquet massa. Sed ut pretium nisl. Ut vitae eros eget arcu sodales consequat sit amet quis lectus. Duis nec aliquet massa. Sed ut pretium nisl. Ut vitae eros eget arcu sodales consequat sit amet quis lectus.
# Developer Documentaion

## What is Prompt Sail?

Prompt Sail is a transparent and user-friendly tool designed to capture and log all interactions with LLM APIs such as OpenAI, Cohere, and others.

For **developers**, it offers a way to analyze and optimize API prompts.

**Project managers** can gain insights into project and experiment costs.

**Business owners** can ensure compliance with regulations and maintain governance over prompts and responses.

## Key Features of Prompt Sail

1. **Transparent Logging**: Prompt Sail captures and logs all interactions with General AI APIs, providing a comprehensive record of prompts and responses.

2. **Optimization and Analysis**: With the ability to analyze and optimize API prompts, developers can fine-tune their applications for better performance and results.

3. **Cost Insights**: Project managers can track and analyze the costs associated with each project and experiment, enabling better budget management.

4. **Compliance and Governance**: Business owners can ensure that their use of AI APIs is compliant with relevant regulations, and maintain control over the prompts and responses used.

5. **Easy Integration**: Prompt Sail is designed to be easily integrated into your existing workflow. Simply change the `base_url` when creating your AI API object to start using Prompt Sail.

6. **Searchable Database**: All prompts and responses are stored in a searchable database, making it easy to find and analyze specific interactions.

7. **User-Friendly Interface**: Prompt Sail features a simple, intuitive UI that makes it easy to search and analyze prompts and responses.

## Incorporating Prompt Sail into Your Workflow

**Installation**

There are two options for installing Prompt Sail:


Execute the Docker image from Docker Hub. (todo: add docker hub link)

```bash
docker run prompt-sail
```


Build the Docker image from the source code.

```bash
docker-docker-compose up --build
```


**Configuration**

The setup is straightforward. You need to modify the `base_url` when creating your AI API object. You can also include additional parameters in the URL, such as `project_slug`, `experiment_id`, and `tags`.

Here's a template for the `base_url`:

```
http://localhost:8000/<project_slug>/chat/completions?experiment_id=welcome_message_gen&tags=zero_shot,simple_prompt,dev1,poc
```



**Usage**

Once the setup is complete, you can begin using Prompt Sail. It will automatically capture and log all prompts and responses. You can then view and analyze this data through the intuitive user interface. UI is available at [http://localhost:80/](http://localhost:80/)

Prompt Sail is designed to integrate smoothly into your workflow, offering valuable insights without causing any disruption to your development process.


23 changes: 23 additions & 0 deletions docs/_pages/collection-archive.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: archive
title: "Posts by Collection"
permalink: /collection-archive/
author_profile: true
---

{% capture written_label %}'None'{% endcapture %}

{% for collection in site.collections %}
{% unless collection.output == false or collection.label == "posts" %}
{% capture label %}{{ collection.label }}{% endcapture %}
{% if label != written_label %}
<h2 id="{{ label | slugify }}" class="archive__subtitle">{{ label }}</h2>
{% capture written_label %}{{ label }}{% endcapture %}
{% endif %}
{% endunless %}
{% for post in collection.docs %}
{% unless collection.output == false or collection.label == "posts" %}
{% include archive-single.html %}
{% endunless %}
{% endfor %}
{% endfor %}
12 changes: 12 additions & 0 deletions docs/_pages/page-archive.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: archive
title: "Page Archive"
permalink: /page-archive/
author_profile: false
---

{% for post in site.pages %}
{% unless post.hidden %}
{% include archive-single.html %}
{% endunless %}
{% endfor %}
59 changes: 59 additions & 0 deletions docs/_pages/post-archive-feature-rows.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
layout: archive
title: "Post Archive with Feature Rows"
permalink: /post-archive-feature-rows/
author_profile: true
feature_row:
- image_path: assets/images/unsplash-gallery-image-1-th.jpg
alt: "placeholder image 1"
title: "Placeholder 1"
excerpt: "This is some sample content that goes here with **Markdown** formatting."
- image_path: /assets/images/unsplash-gallery-image-2-th.jpg
alt: "placeholder image 2"
title: "Placeholder 2"
excerpt: "This is some sample content that goes here with **Markdown** formatting."
url: "#test-link"
btn_label: "Read More"
btn_class: "btn--primary"
- image_path: /assets/images/unsplash-gallery-image-3-th.jpg
title: "Placeholder 3"
excerpt: "This is some sample content that goes here with **Markdown** formatting."
feature_row2:
- image_path: /assets/images/unsplash-gallery-image-2-th.jpg
alt: "placeholder image 2"
title: "Placeholder Image Left Aligned"
excerpt: 'This is some sample content that goes here with **Markdown** formatting. Left aligned with `type="left"`'
url: "#test-link"
btn_label: "Read More"
btn_class: "btn--primary"
feature_row3:
- image_path: /assets/images/unsplash-gallery-image-2-th.jpg
alt: "placeholder image 2"
title: "Placeholder Image Right Aligned"
excerpt: 'This is some sample content that goes here with **Markdown** formatting. Right aligned with `type="right"`'
url: "#test-link"
btn_label: "Read More"
btn_class: "btn--primary"
feature_row4:
- image_path: /assets/images/unsplash-gallery-image-2-th.jpg
alt: "placeholder image 2"
title: "Placeholder Image Center Aligned"
excerpt: 'This is some sample content that goes here with **Markdown** formatting. Centered with `type="center"`'
url: "#test-link"
btn_label: "Read More"
btn_class: "btn--primary"
---

{% for post in site.posts limit: 5 %}
{% include archive-single.html %}
{% endfor %}

{% include feature_row id="intro" type="center" %}

{% include feature_row %}

{% include feature_row id="feature_row2" type="left" %}

{% include feature_row id="feature_row3" type="right" %}

{% include feature_row id="feature_row4" type="center" %}

0 comments on commit abf7e31

Please sign in to comment.