Skip to main content
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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_prompty-1.0.0a1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

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

Hashes for langchain_prompty-1.0.0a1.tar.gz
Algorithm Hash digest
SHA256 9cee76f2f81bca0a3b5b85d7d2d374ae311c4861c389fbef2bbfbade02cf8cf7
MD5 56150db092a727815e16424bdfbf7660
BLAKE2b-256 d54e50e63ed39bfb6c7beba984584f392abe5b54cbbe10b0ab605edfa5f169ab

See more details on using hashes here.

File details

Details for the file langchain_prompty-1.0.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_prompty-1.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 053466e21db33ba5ccba6f7d8c1009c702a64b6dd4f81f0f4610fb4436ca2803
MD5 20be456a4b2fa45c5e0d3d412f958495
BLAKE2b-256 c4ceb2d6317d8d4cf77728b0751375434ad80d9ef63b83326f1da8bec08f00d8

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

This release

1.0.0a1 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page