Skip to main content

LangChain integration for AI Search API (LLM, Chat, tools, and chains).

Project description

🚀 LangChain + AI Search API Integration

PyPI version
Python Support
License: MIT

Official LangChain integration for the AI Search API.
Bring semantic search, contextual answers, summarization, and intelligent agents to your LangChain apps in minutes.


✨ Features

  • 🔑 One-Line Installpip install langchain-aisearchapi
  • 🤖 LLM Interface – Use AI Search API directly as a LangChain LLM
  • 💬 Chat Model – Build conversations with memory & context
  • 🛠️ Agent Tools – Add AI Search, Web Search, Summarization APIs as tools
  • 📚 Prebuilt Chains – Research, Q&A, fact-checking, and summaries out of the box

🔑 Get Started

  1. 🆕 Sign Up
  2. 🔑 Log In
  3. 📊 Dashboard → Copy your API key

⚡ Installation

pip install langchain-aisearchapi

🚀 Quick Examples

LLM Usage

from langchain_aisearchapi import AISearchLLM

llm = AISearchLLM(api_key="your-key")
print(llm("Explain semantic search in simple terms"))

Conversational Chat

from langchain_aisearchapi import AISearchChat
from langchain.schema import HumanMessage

chat = AISearchChat(api_key="your-key")
messages = [
    HumanMessage(content="What is LangChain?"),
    HumanMessage(content="Why do developers use it?")
]
response = chat(messages)
print(response.content)

Tool + Agent

from langchain_aisearchapi import AISearchTool, AISearchLLM
from langchain.agents import initialize_agent, AgentType

tool = AISearchTool(api_key="your-key")
llm = AISearchLLM(api_key="your-key")

agent = initialize_agent(
    tools=[tool],
    llm=llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True
)
print(agent.run("Find the latest SpaceX launch details"))

Research Chain

from langchain_aisearchapi import create_research_chain

research = create_research_chain(api_key="your-key")
print(research.run("Breakthroughs in AI search 2024"))

Summarization

from langchain_aisearchapi import AISearchLLM

llm = AISearchLLM(api_key="your-key")
summary = llm("Summarize this text: AI search connects context and meaning in queries.")
print(summary)

🛠️ Components

Component Description Use Case
AISearchLLM AI Search API as an LLM Completions, text generation
AISearchChat Chat model with context Assistants, multi-turn chats
AISearchTool Search / Web Search API tool Agents, workflows
create_research_chain() Prebuilt chain Research & reporting
Summarization API Text summarization Notes, abstracts

📘 Docs: AI Search API Documentation


❗ Troubleshooting


📚 Resources


🎉 Get Started Now

pip install langchain-aisearchapi

👉 Join now for a free API key and start building!


Made with ❤️ for LangChain developers using the AI Search API.


🔍 SEO Keywords

LangChain AI Search API integration, AI Search API Python package, semantic search LangChain, contextual AI LangChain, AI chatbot LangChain, summarization API LangChain, web search API LangChain, AI Search API key setup, summary API integration

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

langchain_aisearchapi-1.0.5.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_aisearchapi-1.0.5-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file langchain_aisearchapi-1.0.5.tar.gz.

File metadata

  • Download URL: langchain_aisearchapi-1.0.5.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langchain_aisearchapi-1.0.5.tar.gz
Algorithm Hash digest
SHA256 1c3cbe897d93c22f4c1dc713252c54c358efe5012708f729a7fb2bd5f9ab874f
MD5 9b995cfc1cfc2b1adc2b81663fc2261d
BLAKE2b-256 e32f0d99579ef8295b8fc26b1a8f7743a22d68acc71ca277d36681358295ad4f

See more details on using hashes here.

File details

Details for the file langchain_aisearchapi-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_aisearchapi-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3bb744150224c018e41492628ebdf25b89bad1a23ee54c941bf7d3e245075e2e
MD5 09f9ae3d2d9c611d3df86c83f91a042a
BLAKE2b-256 9bf6a7d0bfb0bd9ea1da05a82615b3329d61e2d51b0fcb657b3ebe5d221d28f3

See more details on using hashes here.

Supported by

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