Metadata-Version: 2.4
Name: langchain-commoncompute
Version: 0.1.0
Summary: LangChain provider for Common Compute — plug Apple-Silicon-powered LLMs and embeddings into your LangChain app.
Project-URL: Homepage, https://commoncompute.ai
Project-URL: Documentation, https://commoncompute.ai/docs
Project-URL: Source, https://github.com/Ikaikaalika/commoncomputeai
Author-email: Common Compute <support@commoncompute.ai>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: commoncompute<1.0,>=0.1.1
Requires-Dist: langchain-core<2.0,>=0.3.0
Provides-Extra: test
Requires-Dist: pytest>=7; extra == 'test'
Description-Content-Type: text/markdown

# langchain-commoncompute

LangChain provider for [Common Compute](https://commoncompute.ai).

```bash
pip install langchain-commoncompute
```

```python
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:

```python
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).
