Skip to main content

langchain-commoncompute

LangChain provider for Common Compute.

pip install langchain-commoncompute
from langchain_commoncompute import CommonComputeChat, CommonComputeEmbeddings
from langchain_core.prompts import ChatPromptTemplate

llm = CommonComputeChat(model="qwen-2.5-7b")
emb = CommonComputeEmbeddings(model="bge-small")

prompt = ChatPromptTemplate.from_messages([("user", "Summarize: {doc}")])
chain = prompt | llm
print(chain.invoke({"doc": "Common Compute runs AI on idle Macs."}).content)

Streaming is supported natively:

for chunk in llm.stream("Write a haiku about Apple Silicon."):
    print(chunk.content, end="", flush=True)

Set CC_API_KEY in your environment (or pass api_key=... to either class).

Metadata

Release files for langchain-commoncompute 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 langchain-commoncompute 0.1.0
File Size Uploaded
langchain_commoncompute-0.1.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-commoncompute 0.1.0
File Interpreter ABI Platform
langchain_commoncompute-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / langchain_commoncompute-0.1.0.tar.gz

Download URL langchain_commoncompute-0.1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9bb226495dd3a567da0437338b15dbdfc412e6f000c7c94cb8933b9e5d62b312
BLAKE2b-256 checksum
How to use checksums
4f85cea30cb189d218b5c4047075008ca1d9730628747138f9a3c43488ca65a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

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

Download URL langchain_commoncompute-0.1.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3be0fc969d824b79c7c7e91b5ec355bcc6e4e7d2e9c6eac35c04f479803e597d
BLAKE2b-256 checksum
How to use checksums
b794b4e87231004f800d00dd5e270b4e8943919bd2e1449d40e15e2c722eb642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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