diff --git a/libs/ai-endpoints/docs/chat/nvidia_ai_endpoints.ipynb b/libs/ai-endpoints/docs/chat/nvidia_ai_endpoints.ipynb index da6c5973..90f7ffe9 100644 --- a/libs/ai-endpoints/docs/chat/nvidia_ai_endpoints.ipynb +++ b/libs/ai-endpoints/docs/chat/nvidia_ai_endpoints.ipynb @@ -533,43 +533,6 @@ "For more advanced or custom use-cases (i.e. supporting the diffusion models), you may be interested in leveraging the `NVEModel` client as a requests backbone. The `NVIDIAEmbeddings` class is a good source of inspiration for this. " ] }, - { - "cell_type": "markdown", - "id": "1cd6249a-7ffa-4886-b7e8-5778dc93499e", - "metadata": {}, - "source": [ - "## RAG: Context models\n", - "\n", - "NVIDIA also has Q&A models that support a special \"context\" chat message containing retrieved context (such as documents within a RAG chain). This is useful to avoid prompt-injecting the model. The `_qa_` models like `nemotron_qa_8b` support this.\n", - "\n", - "**Note:** Only \"user\" (human) and \"context\" chat messages are supported for these models; System or AI messages that would useful in conversational flows are not supported." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f994b4d3-c1b0-4e87-aad0-a7b487e2aa43", - "metadata": {}, - "outputs": [], - "source": [ - "#from langchain_core.messages import ChatMessage\n", - "#rom langchain_core.output_parsers import StrOutputParser\n", - "#from langchain_core.prompts import ChatPromptTemplate\n", - "#from langchain_nvidia_ai_endpoints import ChatNVIDIA\n", - "\n", - "#prompt = ChatPromptTemplate.from_messages(\n", - "# [\n", - "# ChatMessage(\n", - "# role=\"context\", content=\"Parrots and Cats have signed the peace accord.\"\n", - "# ),\n", - "# (\"user\", \"{input}\"),\n", - "# ]\n", - "#)\n", - "#llm = ChatNVIDIA(model=\"meta/llama3-8b-instruct\")\n", - "#chain = prompt | llm | StrOutputParser()\n", - "#chain.invoke({\"input\": \"What was signed?\"})" - ] - }, { "cell_type": "markdown", "id": "137662a6", diff --git a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py index afc6434c..863cfd9a 100644 --- a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py +++ b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_statics.py @@ -189,6 +189,14 @@ class Model(BaseModel): "model_type": "image_in", "model_name": "microsoft/phi-3-vision-128k-instruct", }, + "ai-granite-8b-code-instruct": { + "model_type": "chat", + "model_name": "ibm/granite-8b-code-instruct", + }, + "ai-granite-34b-code-instruct": { + "model_type": "chat", + "model_name": "ibm/granite-34b-code-instruct", + }, } ) diff --git a/libs/ai-endpoints/pyproject.toml b/libs/ai-endpoints/pyproject.toml index 69b3b654..8148b794 100644 --- a/libs/ai-endpoints/pyproject.toml +++ b/libs/ai-endpoints/pyproject.toml @@ -1,14 +1,14 @@ [tool.poetry] name = "langchain-nvidia-ai-endpoints" -version = "0.0.18" +version = "0.0.19" description = "An integration package connecting NVIDIA AI Endpoints and LangChain" authors = [] readme = "README.md" -repository = "https://github.com/langchain-ai/langchain" +repository = "https://github.com/langchain-ai/langchain-nvidia" license = "MIT" [tool.poetry.urls] -"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/nvidia-ai-endpoints" +"Source Code" = "https://github.com/langchain-ai/langchain-nvidia/tree/main/libs/ai-endpoints" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" @@ -26,7 +26,7 @@ pytest-mock = "^3.10.0" syrupy = "^4.0.2" pytest-watcher = "^0.3.4" pytest-asyncio = "^0.21.1" -langchain-core = {git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core"} +langchain-core = { git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core" } requests-mock = "^1.11.0" faker = "^24.4.0" @@ -52,13 +52,13 @@ ruff = "^0.1.5" mypy = "^0.991" types-requests = "^2.31.0.10" types-pillow = "^10.2.0.20240125" -langchain-core = {git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core"} +langchain-core = { git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core" } [tool.poetry.group.dev] optional = true [tool.poetry.group.dev.dependencies] -langchain-core = {git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core"} +langchain-core = { git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core" } [tool.ruff.lint] select = [ diff --git a/libs/trt/pyproject.toml b/libs/trt/pyproject.toml index c2bd87bc..890288b9 100644 --- a/libs/trt/pyproject.toml +++ b/libs/trt/pyproject.toml @@ -4,11 +4,11 @@ version = "0.0.1" description = "An integration package connecting TritonTensorRT and LangChain" authors = [] readme = "README.md" -repository = "https://github.com/langchain-ai/langchain" +repository = "https://github.com/langchain-ai/langchain-nvidia" license = "MIT" [tool.poetry.urls] -"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/nvidia-trt" +"Source Code" = "https://github.com/langchain-ai/langchain-nvidia/tree/main/libs/trt" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" @@ -28,7 +28,7 @@ pytest-mock = "^3.10.0" syrupy = "^4.0.2" pytest-watcher = "^0.3.4" pytest-asyncio = "^0.21.1" -langchain-core = {git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core"} +langchain-core = { git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core" } [tool.poetry.group.codespell] optional = true @@ -49,13 +49,13 @@ ruff = "^0.1.5" [tool.poetry.group.typing.dependencies] mypy = "^0.991" -langchain-core = {git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core"} +langchain-core = { git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core" } [tool.poetry.group.dev] optional = true [tool.poetry.group.dev.dependencies] -langchain-core = {git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core"} +langchain-core = { git = "https://github.com/langchain-ai/langchain.git", subdirectory = "libs/core" } [tool.ruff.lint] select = [