Skip to main content

anychat

自定义任意 ChatModel。

用法

from anychat import ChatModeCenter, AnyChat
from langchain_core.messages import HumanMessage, SystemMessage

# 方式一
model = AnyChat(model_name="ai-model-name", api_key="your-ai-api-key", base_url="your-ai-base-url")
messages = [SystemMessage(content="你好"), HumanMessage(content="你好")]
model.invoke(messages)

# 方式二
cmc = ChatModeCenter(api_key="your-ai-api-key", base_url="your-ai-base-url")
model = cmc.get_chat_model("ai-model-name")
model.invoke(messages)

参考

Metadata

Release files for anychat 0.1.1

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

Built distribution (wheel)

Table of built distributions (wheels) for anychat 0.1.1
File Interpreter ABI Platform
anychat-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / anychat-0.1.1-py3-none-any.whl

Download URL anychat-0.1.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22539b8d8b0c9197173cb213ad4871188f25c67770096af75dc8c2dd76456e0e
BLAKE2b-256 checksum
How to use checksums
4002ec51ef1760135731bc7ac8f702b3c50f425444ca4fede275f33aae3b7168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for anychat 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file 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