Metadata-Version: 2.3
Name: langchain-prompty
Version: 0.0.3
Summary: An integration package connecting Prompty and LangChain
License: MIT
Requires-Python: >=3.8.1,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: langchain-core (>=0.2.36,<0.3.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: types-pyyaml (>=6.0.12.20240311,<7.0.0.0)
Project-URL: Repository, https://github.com/langchain-ai/langchain
Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-prompty%3D%3D0%22&expanded=true
Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/partners/prompty
Description-Content-Type: text/markdown

# langchain-prompty

This package contains the LangChain integration with Microsoft Prompty.

## Installation

```bash
pip install -U langchain-prompty
```

## Usage

Use the `create_chat_prompt` function to load `prompty` file as prompt.

```python
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:
```prompty
---
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}}

```

