LingHub Python SDK — AI Routing OS + Agent Marketplace
Project description
linghub — LingHub Python SDK
AI Routing OS + Agent Marketplace の公式 Python クライアントライブラリ。
インストール
pip install linghub
OpenAI / Anthropic / LangChain 統合を含む場合:
pip install "linghub[openai]"
pip install "linghub[anthropic]"
pip install "linghub[all]"
クイックスタート
from linghub import LingHubClient
client = LingHubClient(api_key="pk_xxx")
# ワークフロー実行
result = client.workflows.run("workflow-id", input="テキスト入力")
print(result.output)
# チャット (OpenAI 互換)
response = client.chat.complete(
model="auto",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.content)
OpenAI との統合
import openai
tools = client.workflows.to_openai_tools("workflow-id")
response = openai.chat.completions.create(model="gpt-4o", tools=tools, ...)
Anthropic との統合
import anthropic
tools = client.workflows.to_anthropic_tools("workflow-id")
response = anthropic.messages.create(tools=tools, ...)
LangChain との統合
chain = client.workflows.to_langchain_runnable("workflow-id")
result = chain.invoke({"input": "テキスト"})
ドキュメント
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
linghub-1.0.0.tar.gz
(7.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linghub-1.0.0.tar.gz.
File metadata
- Download URL: linghub-1.0.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf66fcec0bccd8f4223195fd5b9cd0e8d886b3d62f99c379a4f42bdd42bcb55f
|
|
| MD5 |
2c271c5d2e9d65faca62e3736e5dc4e1
|
|
| BLAKE2b-256 |
6712a391515a0b4e92b843d0bb8f5169b0271941343c84c16c1e23c32f0a701e
|
File details
Details for the file linghub-1.0.0-py3-none-any.whl.
File metadata
- Download URL: linghub-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fa800fae1c1704101a4c7e692ace2d55fe9feef10d004595e81ffed2c413824
|
|
| MD5 |
59ee75c4a8c7d86d1d3cc84352271ad5
|
|
| BLAKE2b-256 |
c808711ff320c1aa43a34bb0db23af4ba7e4f5ac73646bb8527a3f749a881457
|