Skip to main content

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": "テキスト"})

ドキュメント

https://nexus.linghub.ai/docs/sdk

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

linghub-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

linghub-1.0.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

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

Hashes for linghub-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf66fcec0bccd8f4223195fd5b9cd0e8d886b3d62f99c379a4f42bdd42bcb55f
MD5 2c271c5d2e9d65faca62e3736e5dc4e1
BLAKE2b-256 6712a391515a0b4e92b843d0bb8f5169b0271941343c84c16c1e23c32f0a701e

See more details on using hashes here.

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

Hashes for linghub-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fa800fae1c1704101a4c7e692ace2d55fe9feef10d004595e81ffed2c413824
MD5 59ee75c4a8c7d86d1d3cc84352271ad5
BLAKE2b-256 c808711ff320c1aa43a34bb0db23af4ba7e4f5ac73646bb8527a3f749a881457

See more details on using hashes here.

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