homanp / langchain-ui

🧬 The open source chat-ai toolkit

Home Page:https://langchain-ui.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Figma design for `Prompt templates` UI

homanp opened this issue · comments

Summary

A user should be able to create and save LangChain compatible Prompt templates as per the specification here: https://python.langchain.com/en/latest/modules/prompts/prompt_templates.html

Expected behaviour

  • A user should be able to create, update or destroy Prompt templates for further user down-stream in Agents of Chats.
  • The prompt template should support inserting variables, as seen in example below:
from langchain import PromptTemplate


template = """
I want you to act as a naming consultant for new companies.

Here are some examples of good company names:

- search engine, Google
- social media, Facebook
- video sharing, YouTube

The name should be short, catchy and easy to remember.

What is a good name for a company that makes {product}?
"""

prompt = PromptTemplate(
    input_variables=["product"],
    template=template,
)

Design inspiration

The app boilerplate looks as follows. Perhaps a list/detail view would be appropriate for this.

Screenshot 2023-03-27 at 09 52 57