Pre-release
This release is a pre-release and may not be stable for production use.
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}}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
langchain_prompty-1.0.0a1.tar.gz
(14.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_prompty-1.0.0a1.tar.gz.
File metadata
- Download URL: langchain_prompty-1.0.0a1.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cee76f2f81bca0a3b5b85d7d2d374ae311c4861c389fbef2bbfbade02cf8cf7
|
|
| MD5 |
56150db092a727815e16424bdfbf7660
|
|
| BLAKE2b-256 |
d54e50e63ed39bfb6c7beba984584f392abe5b54cbbe10b0ab605edfa5f169ab
|
File details
Details for the file langchain_prompty-1.0.0a1-py3-none-any.whl.
File metadata
- Download URL: langchain_prompty-1.0.0a1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
053466e21db33ba5ccba6f7d8c1009c702a64b6dd4f81f0f4610fb4436ca2803
|
|
| MD5 |
20be456a4b2fa45c5e0d3d412f958495
|
|
| BLAKE2b-256 |
c4ceb2d6317d8d4cf77728b0751375434ad80d9ef63b83326f1da8bec08f00d8
|