LangChain integration for AI Search API (LLM, Chat, tools, and chains).
Project description
🚀 LangChain + AI Search API Integration
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 Install –
pip 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
- 🆕 Sign Up
- 🔑 Log In
- 📊 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
- No API key? → Sign up
- Issues with key? → Check Dashboard
- Rate limited? → Add retries (e.g. with tenacity)
📚 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c3cbe897d93c22f4c1dc713252c54c358efe5012708f729a7fb2bd5f9ab874f
|
|
| MD5 |
9b995cfc1cfc2b1adc2b81663fc2261d
|
|
| BLAKE2b-256 |
e32f0d99579ef8295b8fc26b1a8f7743a22d68acc71ca277d36681358295ad4f
|
File details
Details for the file langchain_aisearchapi-1.0.5-py3-none-any.whl.
File metadata
- Download URL: langchain_aisearchapi-1.0.5-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bb744150224c018e41492628ebdf25b89bad1a23ee54c941bf7d3e245075e2e
|
|
| MD5 |
09f9ae3d2d9c611d3df86c83f91a042a
|
|
| BLAKE2b-256 |
9bf6a7d0bfb0bd9ea1da05a82615b3329d61e2d51b0fcb657b3ebe5d221d28f3
|