Skip to main content

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-0.1.2.tar.gz (13.9 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-0.1.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file langchain_prompty-0.1.2.tar.gz.

File metadata

  • Download URL: langchain_prompty-0.1.2.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langchain_prompty-0.1.2.tar.gz
Algorithm Hash digest
SHA256 91d012f29425c118df38d4e8af63adf167524471e5d263ba33e1253673da059f
MD5 62e862dac0ba1c2c9d58f3fe281f0fb4
BLAKE2b-256 5b483b791eea3e84da2f29a5ca40a3a21927b9d58aa0987b8239dfc91e09b90d

See more details on using hashes here.

File details

Details for the file langchain_prompty-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_prompty-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a2f2fc0e2fd4632a093dfb5ac65c4eea3ff8879a1f7112f836c36a9fe50e21c
MD5 8084f379c77e9d8caeb37f24922196b6
BLAKE2b-256 8ca889901d4107ff5e574df4db6e9a5ac98571d898f15def3e5d42bf08016969

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

This release

0.1.2 This release

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