Skip to main content

LangChain integration library for AOps

Project description

aops

PyPI Python

LangChain integration library for AOps — load and version-control your agent prompts from the AOps backend.

Installation

pip install aops

Quick Start

import aops
from aops.langchain import pull
from langchain_core.prompts import ChatPromptTemplate, HumanMessagePromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_openai import ChatOpenAI

aops.init(api_key="aops_...")

prompt = pull("my-agent/my-chain")

chain = (
    ChatPromptTemplate.from_messages([
        prompt,
        HumanMessagePromptTemplate.from_template("{user_input}"),
    ])
    | ChatOpenAI(model="gpt-4o-mini")
    | StrOutputParser()
)

result = chain.invoke({"user_input": "Hello!"})

Requirements

  • Python 3.12+
  • AOps backend running (self-hosted)
  • API key issued from the AOps UI: Agent detail page → API Keys → New API Key

Docs

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aops-0.2.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

aops-0.2.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file aops-0.2.1.tar.gz.

File metadata

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

File hashes

Hashes for aops-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d7d5265cd159673928eb3b9b22c6de5510489e4eb830afe097a11cb2f4de4735
MD5 e7c764dfd03620b568b041513e3b5b4b
BLAKE2b-256 2198a40acea9fc3f96f08ac01e401c85ea0ad5204b696eb0970f8a200819b340

See more details on using hashes here.

Provenance

The following attestation bundles were made for aops-0.2.1.tar.gz:

Publisher: publish.yml on cow-coding/aops-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aops-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: aops-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aops-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13eddca7f241c0c5cd2d354b1d505b2053b7f9eaf775e7d0cc10f4f00b9d090b
MD5 5aa9c18abee166838d7518e1e90dba2d
BLAKE2b-256 20245f00772a08906740d2009eb1d7ba0cb149fe3ee24fa86c5b18d604917ee6

See more details on using hashes here.

Provenance

The following attestation bundles were made for aops-0.2.1-py3-none-any.whl:

Publisher: publish.yml on cow-coding/aops-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page