이 문서는 Netmind chat models를 시작하는 데 도움을 드립니다. 모든 ChatNetmind 기능 및 구성에 대한 자세한 문서는 API reference를 참조하세요.

개요

Integration 세부 정보

ClassPackageLocalSerializableJS supportDownloadsVersion
ChatNetmindlangchain-netmindPyPI - DownloadsPyPI - Version

Model 기능

Tool callingStructured outputJSON modeImage inputAudio inputVideo inputToken-level streamingNative asyncToken usageLogprobs

설정

Netmind model에 액세스하려면 Netmind 계정을 생성하고 API key를 발급받은 후 langchain-netmind integration package를 설치해야 합니다.

자격 증명

www.netmind.ai/로 이동하여 Netmind에 가입하고 API key를 생성하세요. 완료한 후 NETMIND_API_KEY environment variable을 설정하세요:
import getpass
import os

if not os.getenv("NETMIND_API_KEY"):
    os.environ["NETMIND_API_KEY"] = getpass.getpass("Enter your Netmind API key: ")
model 호출에 대한 자동 추적을 원하시면 아래 주석을 해제하여 LangSmith API key를 설정할 수도 있습니다:
# os.environ["LANGCHAIN_TRACING_V2"] = "true"
# os.environ["LANGCHAIN_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")

설치

LangChain Netmind integration은 langchain-netmind package에 있습니다:
pip install -qU langchain-netmind
[notice] A new release of pip is available: 24.0 -> 25.0.1
[notice] To update, run: pip install -U pip
Note: you may need to restart the kernel to use updated packages.

인스턴스화

이제 model object를 인스턴스화하고 chat completion을 생성할 수 있습니다:
from langchain_netmind import ChatNetmind

llm = ChatNetmind(
    model="deepseek-ai/DeepSeek-V3",
    temperature=0,
    max_tokens=None,
    timeout=None,
    max_retries=2,
    # other params...
)

호출

messages = [
    (
        "system",
        "You are a helpful assistant that translates English to French. Translate the user sentence.",
    ),
    ("human", "I love programming."),
]
ai_msg = llm.invoke(messages)
ai_msg
AIMessage(content="J'adore programmer.", additional_kwargs={'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 13, 'prompt_tokens': 31, 'total_tokens': 44, 'completion_tokens_details': None, 'prompt_tokens_details': None}, 'model_name': 'deepseek-ai/DeepSeek-V3', 'system_fingerprint': None, 'finish_reason': 'stop', 'logprobs': None}, id='run-ca6c2010-844d-4bf6-baac-6e248491b000-0', usage_metadata={'input_tokens': 31, 'output_tokens': 13, 'total_tokens': 44, 'input_token_details': {}, 'output_token_details': {}})
print(ai_msg.content)
J'adore programmer.

API reference

모든 ChatNetmind 기능 및 구성에 대한 자세한 문서는 API reference를 참조하세요:

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I