langchain-palantir: A LangChain Integration with Palantir-provided LLMs

langchain-palantir

I signed up for the Palantir AIP Developer Tier last year, and have since been experimenting with its capabilities. One of the most powerful aspects of the Developer Tier is the generous LLM inference offerings that are given for free, but generally those LLMs are only usable with AIP Agent Studio or via palantir_models, the AIP custom LLM inference library.

In my spare time I have been developing langchain-palantir, a LangChain integration for Palantir-provided LLMs. langchain-palantir provides implementations of the standard LangChain constructs like ChatModel, Embeddings, and BaseLoader by wrapping calls to the palantir_models library.

This library is open source (Apache-2.0) and usable in your own projects. I do not have a marketplace export file as my Developer Tier account does not allow that, so you’ll have to find a way to get the code itself into your own AIP account and build the Python library from there.

Chat Models

Chat Model Model Family Chat Completions Tool Calling Image Input
PalantirChatOpenAI OpenAI GPT :white_check_mark: :white_check_mark: :white_check_mark:
PalantirChatAnthropic Anthropic Claude :white_check_mark: :white_check_mark: :white_check_mark:
PalantirChatGeneric Meta Llama, etc. :white_check_mark: :cross_mark: :cross_mark:

Embedding Models

Embedding Model Embed Query Embed Documents
PalantirGenericEmbeddings :white_check_mark: :white_check_mark:

Vector Stores

Vector Store Add/Remove Vectors Similarity Search
PalantirOntology :white_check_mark: :white_check_mark:

Document Loaders

Document Loader Images (PNG/JPG) PDFs
PalantirVisionLLMLoader :white_check_mark: :cross_mark:
1 Like