An integration package connecting Prompty and LangChain
Project description
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}}
Project details
Release history Release notifications | RSS feed
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
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.0.tar.gz.
File metadata
- Download URL: langchain_prompty-1.0.0.tar.gz
- Upload date:
- Size: 137.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
439c50ae99305d593ecdd2971902cf665f5a1d59a20fc5053c7c75f368096cba
|
|
| MD5 |
f3866b2bb34506abc33c189d1755cd0c
|
|
| BLAKE2b-256 |
569c8c7b2387b1d80586289e930f20868b44176329a47c66e797808cbefdcbfd
|
File details
Details for the file langchain_prompty-1.0.0-py3-none-any.whl.
File metadata
- Download URL: langchain_prompty-1.0.0-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 |
df7be67d300d50b74743f3ae68867ed1fe5366a0d65537b72f5eed9780cbf640
|
|
| MD5 |
4fe0724ab1ed03150d990e3308ff7017
|
|
| BLAKE2b-256 |
7cd43e56cea1f66c5fa3a96bb172f5b543d9ac139cd58da3676fbb270c79b098
|