Skip to main content

pulse-openai

OpenAI adapter for PULSE Protocol.

Send PULSE semantic messages, get AI responses. Zero OpenAI boilerplate.

Install

pip install pulse-openai

Quick Start

from pulse import PulseMessage
from pulse_openai import OpenAIAdapter

adapter = OpenAIAdapter(api_key="sk-...")

# Ask a question
msg = PulseMessage(
    action="ACT.QUERY.DATA",
    parameters={"query": "What is quantum computing?"}
)
response = adapter.send(msg)
print(response.content["parameters"]["result"])

# Analyze sentiment
msg = PulseMessage(
    action="ACT.ANALYZE.SENTIMENT",
    parameters={"text": "I love this product!"}
)
response = adapter.send(msg)
print(response.content["parameters"]["result"])

Supported Actions

PULSE Action What it does Default Model
ACT.QUERY.DATA Ask a question gpt-4o-mini
ACT.CREATE.TEXT Generate text gpt-4o
ACT.ANALYZE.SENTIMENT Analyze sentiment gpt-4o-mini
ACT.ANALYZE.PATTERN Find patterns gpt-4o
ACT.TRANSFORM.TRANSLATE Translate text gpt-4o-mini
ACT.TRANSFORM.SUMMARIZE Summarize text gpt-4o-mini

Parameters

# Override model
parameters={"query": "...", "model": "gpt-4o"}

# Set temperature
parameters={"query": "...", "temperature": 0.9}

# Limit tokens
parameters={"query": "...", "max_tokens": 500}

# Custom system prompt
parameters={"text": "...", "system_prompt": "You are a helpful assistant."}

# Translation target
parameters={"text": "Hello!", "target_language": "Spanish"}

Why?

Your code speaks PULSE. Today it uses OpenAI. Tomorrow you swap in pulse-anthropic or pulse-local — zero code changes.

# adapter = OpenAIAdapter(api_key="sk-...")
adapter = AnthropicAdapter(api_key="sk-ant-...")  # Same code works

License

Apache 2.0

Metadata

Release files for pulse-openai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulse-openai 0.1.0
File Size Uploaded Provenance Actions
pulse_openai-0.1.0.tar.gz 8.7 kB Without provenance Details for pulse_openai-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pulse-openai 0.1.0
File Interpreter ABI Platform Actions
pulse_openai-0.1.0-py3-none-any.whl Python 3 none any Details for pulse_openai-0.1.0-py3-none-any.whl

Total release size: 14.9 kB

Release files / pulse_openai-0.1.0.tar.gz

Download URL pulse_openai-0.1.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a0e0c6d7abea4eb5c7356961a6816f6184f4233b0ca0ca1ae0498d714da18510
BLAKE2b-256 checksum
How to use checksums
ee0d81219be4c53409dd4faa6769344be800630da32440c987b00db5645c08e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / pulse_openai-0.1.0-py3-none-any.whl

Download URL pulse_openai-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47383625822c1b44c18c4d3d85f716831c6806c37c2867fba2446f7e31708169
BLAKE2b-256 checksum
How to use checksums
3490838414c7893fc1ed3007b1a984481d9020475906a08888ce10c9447fc26e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for pulse-openai 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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