An integration package connecting Prompty and LangChain
Project description
langchain-prompty
This package contains the LangChain integration with Microsoft Prompty.
Installation
pip install -U langchain-prompty
Usage
Use the create_chat_prompt
function to load prompty
file as prompt.
from langchain_prompty import create_chat_prompt
prompt = create_chat_prompt('<your .prompty file path>')
Then you can use the prompt for next steps.
Here is an example .prompty file:
---
name: Basic Prompt
description: A basic prompt that uses the GPT-3 chat API to answer questions
authors:
- author_1
- author_2
model:
api: chat
configuration:
azure_deployment: gpt-35-turbo
sample:
firstName: Jane
lastName: Doe
question: What is the meaning of life?
chat_history: []
---
system:
You are an AI assistant who helps people find information.
As the assistant, you answer questions briefly, succinctly,
and in a personable manner using markdown and even add some personal flair with appropriate emojis.
{% for item in chat_history %}
{{item.role}}:
{{item.content}}
{% endfor %}
user:
{{input}}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for langchain_prompty-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5723209fbb42dcb2a76481667b2963b16b264ff030a9a79fa6d9624803e6f20 |
|
MD5 | 07cafd3202a1b7f88c85b11e971ba17e |
|
BLAKE2b-256 | d25cc478addf78b86ef94ecea5d17d98a7248041c0cebb6c62d1803309b7148d |