langchain-prompty
Looking for the JS/TS version? Check out LangChain.js.
Quick Install
pip install langchain-prompty
🤔 What is this?
This package contains the LangChain integration with Microsoft Prompty.
📖 Documentation
View the documentation for more details.
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}}
Release files for langchain-prompty 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_prompty-1.0.0.tar.gz | 137.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_prompty-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 148.1 kB
Release files / langchain_prompty-1.0.0.tar.gz
| Download URL | langchain_prompty-1.0.0.tar.gz |
|---|---|
| Size | 137.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
439c50ae99305d593ecdd2971902cf665f5a1d59a20fc5053c7c75f368096cba
|
|
BLAKE2b-256 checksum How to use checksums |
569c8c7b2387b1d80586289e930f20868b44176329a47c66e797808cbefdcbfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / langchain_prompty-1.0.0-py3-none-any.whl
| Download URL | langchain_prompty-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df7be67d300d50b74743f3ae68867ed1fe5366a0d65537b72f5eed9780cbf640
|
|
BLAKE2b-256 checksum How to use checksums |
7cd43e56cea1f66c5fa3a96bb172f5b543d9ac139cd58da3676fbb270c79b098
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|