Skip to main content

An integration package connecting Ollama and GigaChain

Project description

langchain-ollama

This package contains the LangChain integration with Ollama

Installation

pip install -U langchain-ollama

You will also need to run the Ollama server locally. You can download it here.

Chat Models

ChatOllama class exposes chat models from Ollama.

from langchain_ollama import ChatOllama

llm = ChatOllama(model="llama3-groq-tool-use")
llm.invoke("Sing a ballad of LangChain.")

Embeddings

OllamaEmbeddings class exposes embeddings from Ollama.

from langchain_ollama import OllamaEmbeddings

embeddings = OllamaEmbeddings(model="llama3")
embeddings.embed_query("What is the meaning of life?")

LLMs

OllamaLLM class exposes LLMs from Ollama.

from langchain_ollama import OllamaLLM

llm = OllamaLLM(model="llama3")
llm.invoke("The meaning of life is")

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

gigachain_ollama-0.1.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

gigachain_ollama-0.1.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file gigachain_ollama-0.1.1.tar.gz.

File metadata

  • Download URL: gigachain_ollama-0.1.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/23.5.0

File hashes

Hashes for gigachain_ollama-0.1.1.tar.gz
Algorithm Hash digest
SHA256 22014c1000564b7d6f24b63b35d26e3d355e9134053ed682f847e971ff2d234a
MD5 75053efed5210b184ad7f63bb0d0f7f6
BLAKE2b-256 71a65dd52a1d522049e34b0ba47189e3c75a7daa90bd7cf4a5fd3d192a1d5233

See more details on using hashes here.

File details

Details for the file gigachain_ollama-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gigachain_ollama-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1917f41670828c54adf86a32769746d836c97e22c3dc96daa8b5d1acb96d98c
MD5 9f5ae9e8d104c00b93abe5ec066e9261
BLAKE2b-256 95ea2ec7ee0cdf80280608cca01980b9f6eaf59dcb2cfdd594d36d2f6aaa4a10

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page