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
File details
Details for the file langchain_prompty-0.0.1.tar.gz
.
File metadata
- Download URL: langchain_prompty-0.0.1.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ba29da5d2cb12fbbd3426a16311091d60f63fe94286a1ca8307e367c510d3b5 |
|
MD5 | 13d3b91f3c46a19a915ba41aec72299f |
|
BLAKE2b-256 | a2ca808999402d96e2c0632e27ade18a866e650ccf9a8ee137ec728e88c50d00 |
File details
Details for the file langchain_prompty-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: langchain_prompty-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fe3e5eb8032be3eccb7af4011e107a893ab244c6e0318faf6b135dc417a40da |
|
MD5 | 0e195b6807bf96d76faf553e296540f3 |
|
BLAKE2b-256 | c0a5fa0e8aef5f1e3eb9179dea5c1f94a496fb32be939fd809f546215dbd1443 |