NVIDIA AI Enterprise? ??? NVIDIA NIM? ?? Llama 3.1? ?? ??? ?? ?? ?? ??? ?????. ?? LangChain? ???? ???? ?????? ??? ? ?? ???? ?? ???? ?????. NIM ???????? Llama 3.1? ?? ?? ?? ??? ??? ??? ????, LangChain ??????? NVIDIA API ?????? ??? ???? ? ????.
NVIDIA NIM?? AI ???? ????
Llama 3.1 NIM ???????? ???? ???? ??? ?? ?? ??? ?? ??? AI ??????? ??? ? ????. ??? ???? ??? ?? ???? ??? ??? ???? ?? ???? ???? ??????? ??? ? ????. ??? ??? NVIDIA ??? ???? Llama 3.1 ????? ?????.
NIM? ???? ???? ?? OpenAI ?? ? ?? API? ?????. ?? LangChain? ??? ?? NIM ???????? ????? ??????? ???? ??? ???? ???? ??? ??? ? ????.
NIM? ?? ?? ??
??? ????? ???? ??? ?? ??? ???? ???? ??? ??? ?? ??? ?????. ???? ?? ?? API ??? ????? ??? ??? ?? ????.
?? ?? ?? ??? ?????? ?? ??? ????, ? ?? ??? ?????? 49ers? ?? ?? ?? ??? ??? ? ????.
??? ??????? ? ??? ????? ?? ??? ??? ??? ???? ??? ?? ??? ??? JSON? ?? ???? ??? ????? ??? ????? ???. ?? ?? ? ??? NVIDIA ???? ??? ??? ?? NIM ???????? ????? LangChain? LangGraph? ?? ?????? ?????.
LangChain? ???? ??? LLM ?????? ????
??? ?? ??? ???? Llama 3.1? ?? ???? LangChain? ???? ?????. ??? ?? ? ChatNVIDIA ????? ??? ?? ??? ??? LangChain NVIDIA ???? ?????.
?? ??? ???? ?? ??? ????? ?? ??? ?????:
from langchain_nvidia_ai_endpoints import ChatNVIDIA
tool_models = [model for model in ChatNVIDIA.get_available_models() if model.supports_tools]
???? ??? ??? ???? LangChain? bind_tools ??? ???? ??? ???? ? ????.
from langchain_core.pydantic_v1 import Field
from langchain_core.tools import tool
@tool
def get_current_weather(
location: str = Field(..., description="The location to get the weather for.")
):
"""Get the current weather for a location."""
...
llm = ChatNVIDIA(model=tool_models[0].id).bind_tools(tools=[get_current_weather])
response = llm.invoke("What is the weather in Boston?")
response.tool_calls
?? ???? Tavily API? ??? ? ??, get_current_weather ???? ?? ??? API? ??? ? ????.
? ?? ??? ????
?? ?? ??? ??? ??? ??? ??? ? ??? ???? ?? ??? ????. GitHub? ????? ?? ?? ??? ?? NVIDIA NIM ???? ? ? ??? LangChain? LangGraph? NIM ???????? ?????.
?? ??, ?? ?????, ?? RAG, ??? ?? ?? ??? ?? NIM ???????? ?? ??, ?? ?? ??????? ???? ?? LangGraph ??? ??? ???.
?? RAG? ?? RAG ? ?? RAG? ?? ??? ???? ???? ??????? LangGraph ? NVIDIA NeMo Retriever? ??? ? ????. ??? ??? Llama 3.1? ??? ???? RAG ????? ?? ? NVIDIA NeMo Retriever NIM ???????? ?? ???? ?????.
NVIDIA NIM ???????? ?????? ??? ?????!