Smarter Documentation

Getting Started

  • Why Smarter
    • AI training for your whole workforce
    • No code. Just a manifest.
    • Every way to reach external data
    • Governed from the first prompt
    • Contained by design
    • Composed like an orchestra
    • Built for teams
    • Runs at scale, on your infrastructure
    • Open to your own software
    • At a glance
    • Usage

Teaching and Training

  • Smarter Instructor Guide
    • Open Source, Free, and Community Supported
    • From Educational Sandbox to Live Production
    • Free Course Designs
    • Getting Smarter Running
      • Quick Start
      • From Source
      • The Command-Line Interface
      • A First Look Around
    • Setting Up a Class
      • Choosing a Deployment Model
      • Accounts and Users
      • Managing Cost
      • Privacy and Academic Integrity
    • Planning a Course
      • Sample Formats
      • Assignments and Grading
    • Instructor Checklist
    • Getting Help and Giving Back
  • Free Course Designs
    • Micro Courses
      • Course Formats and Grading
        • The Three Formats
        • Grading
        • Course Policies
        • Before Teaching a Plan
      • Prompt Engineering
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Building AI Applications
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • AI Governance and Responsible AI
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • The Economics of AI
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Backend Development with Python, Django, Django REST Framework and Pydantic
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Front End Development with React, Vite.js and Bootstrap
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Full Stack Development with Django and React
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • API Design and Integration
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Extension Development
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • AI Features in Software
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Writing Secure Software for the Internet
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Docker for Software Development
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Kubernetes for Running Applications at Scale
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Cloud Infrastructure as Code
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Self-Hosting Open Models
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Software Quality and Quality Assurance
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Creating High Quality Documentation with Sphinx
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Software Architecture
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Agentic Software Development with Claude Code
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Open Source Participation
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
    • Master Classes
      • Django Master Class
        • Three-day classroom course: 18 hours
        • Six-week online course: 18 hours
      • AI Application Development Master Class
        • Three-day classroom course: 18 hours
        • Six-week online course: 18 hours
      • Python Programming with Agentic AI Master Class
        • Three-day classroom course: 18 hours
        • Six-week online course: 18 hours
  • Case Studies
    • Shadow AI: Taking Control of the AI Projects Already Running
      • At a glance
      • Executive summary
      • Background
      • The challenge
        • What leaving it there costs
        • The requirements
      • Options considered
      • The solution
        • General Amnesty Granted
        • Phase 1: a Proxy for every project
        • One project, one key
        • Spending: attributed, and capped
        • The inventory
        • Phase 2: rebuild what sends too much
        • The two phases, side by side
      • Implementation
      • Results
      • Lessons for practitioners
      • Sources
    • Ask Stanley: Answers for Prospective Students, at Any Hour
      • At a glance
      • Executive summary
      • Background
        • The first chatbot
        • The people
      • The challenge
      • Options considered
      • The solution
        • How Stanley answers a question
        • The tool: one reviewed query
        • Accurate: the database, not the model
        • Need to know: only what the question needs
        • Timely: a chat window that never closes
        • Safe to expose: the catalogue, and nothing else
        • Bounded: a budget with a hard stop
        • How each role uses it
        • What Stanley doesn’t do yet
      • Implementation
      • Results
      • Lessons for practitioners
      • Sources
    • Organizing for AI: Everyone Can Ask the Data
      • At a glance
      • Executive summary
      • Who is Stackademy?
      • The organization and its people
      • What the platform has to do
      • How each role uses it
        • The Head of IT: Tomas Hartigan
        • Human Resources: Avery Ivanova and Quinn Sandoval
        • The CFO and Accounting: Odette Hartigan and Kofi Sandoval
        • Course Content: Odette Eriksen and Tomas Underhill
        • Admissions: Dmitri Dumont and Wren Dumont
        • The executives: Vera Jaramillo and Odette Hartigan
      • How it fits together
      • Results
      • Lessons for practitioners
      • Sources
    • Confidential by Construction: AI Assistants over One Company Database
      • At a glance
      • Executive summary
      • Background
      • The challenge
      • Options considered
      • The solution
      • Implementation
      • Results
      • Lessons for practitioners
      • Sources
    • The Board Pack: Orchestrating Assistants Across Organizational Boundaries
      • At a glance
      • Executive summary
      • Background
      • The challenge
      • Options considered
      • The solution
      • Implementation
      • Results
      • Lessons for practitioners
      • Sources
    • The Smarter Doodle: Celebrating Special Days, Without an Artist or an Arbiter
      • At a glance
      • Executive summary
      • Background
        • The roles
      • The challenge
      • Options considered
      • The solution
        • 1. The calendar: a catalog, and a planner
        • 2. The candidates: what the editor may choose from
        • 3. The editor: a Smarter LLMClient
        • 4. The checks: Python, whatever the prompt says
        • 5. The tone judge: a Guardrail, called by code
        • 6. The artist: a second LLMClient
        • 7. The sanitizer: Python, by allowlist
        • 8. The superuser: approval, not arbitration
        • Credit, and a record
      • Implementation
      • Results
      • Lessons for practitioners
      • Sources

Community

  • Smarter on Slack
    • What the Bot Is
    • Talking to the Bot
      • In a channel
      • In a direct message
      • Getting help
      • Waiting for the answer
    • Asking Good Questions
    • How Answers Look in Slack
    • Limits
    • Privacy
    • When to Ask a Person
    • Troubleshooting
    • Running Your Own

Smarter Docs

  • Platform Administration Guide
    • Installation
    • Configuration
      • How the settings are initialized
      • 1. AWS Infrastructure Configuration
      • 2. Django Settings
      • 3. Overrides
        • Turning resource types off
      • 4. Asynchronous Task Queue Configuration
      • 5. Beat Scheduler Configuration
      • 6. Helm Chart Configuration
      • 7. Dockerfile Configuration
      • 8. GitHub Actions Secrets Configuration
      • 9. Secrets Management
      • 10. Logging Configuration
      • 11. Database Configuration
      • 12. Email/Notification Configuration
      • 13. Static & Media Files Configuration
      • 14. Smarter Settings Class Reference
        • URL Patterns
        • Overrides
    • System Administration
      • Operations
        • Software Updates
        • Backup and Restore
      • Administration Tools
        • Smarter Web Console
        • Django Admin
        • Smarter CLI
        • MCPServer
      • Accounts and Access
        • Account Management
        • User Management
        • API Keys
      • LLM Providers and Extensions
        • How-To: Adding an LLM Provider to Smarter
        • Managing Extensions
      • Costs and Auditing
        • Cost Accounting
        • Smarter Journal
      • Security
        • Infrastructure Security
        • Application Security
        • Supply-Chain Security
        • Security FAQ
    • Trouble Shooting & FAQ
      • Where to go for Help
  • Smarter AI Resource Reference
    • Smarter Account
      • Overview
      • Usage
      • Technical Reference
        • API Reference
        • manage.py Commands
        • Const
        • Hierarchy
        • LLM Price Catalog
        • LLM Price Checker
        • Account Django ORM
        • Receivers
        • Repository Apply
        • Repository Owners
        • Repository Scripts
        • Smarter Resources - Account
        • Smarter API Manifests (SAM)
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • User Merge
        • Utils
    • Smarter Authtoken
      • Overview
      • Overview
      • Technical Reference
    • Smarter Budget
      • Overview
      • Technical Reference
        • Budget Model
        • Budget
        • Budget
    • Smarter Connection
      • Overview
      • Example Manifest
      • Technical Reference
        • API Reference
        • Const
        • API Request Execution
        • Manifest
        • Django ORM
        • Receivers
        • SAM Resources
        • DRF Serializers
        • Signals
        • SSH Tunnel
        • Asynchronous Tasks
        • URLs
        • Views
    • Smarter Custom Domain
      • Overview
      • How It Works
      • The Manifest
      • Verification
    • Smarter Guardrail
      • Overview
      • How It Works
      • The Manifest
        • Strategies
        • Actions
        • Modes and Failure
      • Built-in Guardrails
      • Security Notes
      • Technical Reference
        • Django Admin
        • API Reference
        • Caching
        • Const
        • Exceptions
        • Smarter API Manifests (SAM)
        • Django ORM
        • Signal Receivers
        • DRF Serializers
        • Services
        • Signals
        • Asynchronous Tasks
        • Views
    • Smarter LLM Client
      • Overview
      • Usage
      • Web Pages That Embed It
      • Staff-Only LLMClients
      • Model Settings
      • Searching Your Documents
      • Styling the Chat
        • Styling Your LLMClient’s Chat
      • Example Manifest
      • Technical Reference
        • API Reference
        • Models
        • Smarter API Manifests (SAM)
        • DRF Serializers
        • React UI
        • LLMClientHelper Class
        • Kubernetes Ingress
        • Management Commands
        • Middleware
        • Tasks
        • Signals
        • URLs
        • Utils
        • Views
      • Sandbox Mode
      • Deploying
      • Updating
      • Deleting
      • Testing
      • Monitoring
      • Scaling
      • Trouble Shooting
    • Smarter LLM Host
      • Overview
      • Example: Self-Hosting a Hugging Face Model
      • Technical Reference
        • API Reference
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Views
    • Smarter MCP Client
      • Overview
      • How It Works
      • The Manifest
        • Authentication
        • Security
      • Example Manifests
      • Technical Reference
        • API Reference
        • Caching
        • MCP Server Connections
        • Const
        • Exceptions
        • Tool Call Execution
        • Smarter API Manifests (SAM)
        • Django ORM
        • Signal Receivers
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Prompt Toolkit
        • Views
    • Smarter Orchestrator
      • Overview
      • Harnesses in other accounts
      • Running an Orchestrator
      • Technical Reference
        • API Reference
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • Runtime
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Views
    • Smarter LLMTool Plugin
      • Overview
      • Usage
      • Example Manifest
      • Technical Reference
        • API Reference
        • Caching
        • Const
        • How it Works
        • How LLM Tool Calling Works
        • LLMTool Plugin Reference
        • Django Management Commands
        • Django ORM
        • Smarter API Manifests (SAM)
        • DRF Serializers
        • Natural Language Processing (NLP)
        • Signals
        • Receivers
        • Tool Runner
        • Asynchronous Tasks
        • Views
    • Smarter Prompt
      • Overview
      • Usage
      • Technical Reference
        • Example Prompt Configuration
        • Example Prompt Request
        • Example Prompt Response
        • API Reference
        • Const
        • Manifests (SAM)
        • Django ORM
        • Django Management Commands
        • Signals
        • Asynchronous Tasks
        • Urls
        • Prompt Views
    • Smarter Provider
      • Overview
      • Technical Reference
        • API Reference
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • DRF Serializers
        • Services
        • Signals
        • Asynchronous Tasks
        • Utils
        • Verification
        • Views
    • Smarter Proxy
      • Overview
      • How It Works
      • Quick Start
      • Creating a Proxy
      • Manifest Reference
      • Authentication
      • Errors
      • Security
      • Usage and Budgets
      • Built-in Proxies
      • Technical Reference
        • API Reference
        • Authentication
        • Caching
        • Const
        • Exceptions
        • Smarter API Manifests (SAM)
        • Django ORM
        • Serializers
        • Passthrough Service
        • Signals
        • Views
    • Smarter Secret
      • Overview
      • Technical Reference
        • API Reference
        • Django Admin
        • Caching
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • Receivers
        • Secret Resources
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Urls
        • Views
    • Smarter Vectorsearch
      • Using a Vectorsearch in an LLMClient
        • API Reference
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • Run
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Toolkit
        • Views
    • Smarter Vectorstore
      • Overview
      • Example Manifests
      • Lifecycle
        • Deploying
        • Self-Hosted Qdrant
        • Managed Services
      • Documents
      • Search
      • Maintenance and Snapshots
      • Technical Reference
        • REST API
        • Vectorstore Backends
        • Caching
        • Management Commands
        • Vectorstore Deployment
        • Vectorstore Execution
        • Documents: Text Extraction and Embeddings
        • Self-Hosted Qdrant on Kubernetes
        • Vectorstore Manifest
        • Vectorstore ORM Models
        • Vectorstore Receivers
        • Vectorstore Serializers
        • Vectorstore Services
        • Vectorstore Signals
        • Vectorstore Asynchronous Tasks
        • Web Console Views
  • Smarter Development Framework
    • Architecture
      • Smarter Architecture
        • Linux
        • Third-Party Django Apps
        • Smarter Subsystems
        • Smarter Django Apps
      • Smarter Broker Model
        • AbstractBroker
        • BrokerNotImplemented
        • KNOWN_KINDS
        • MetaModelT
        • ModelT
        • OwnedModelT
        • RowT
        • SAMDependency
        • SAMDependencyReference
        • SAMDependents
        • dependents_exist()
        • first_arg_of_type()
        • memoized_dependencies()
        • rows_with_pk()
        • should_log()
      • Smarter on Kubernetes
        • The Egress Proxy
        • LLMClient Deployment
        • Operating Smarter at Scale
        • The Slack Bot
        • The Tool Worker
        • The Services
        • Docker and Kubernetes Compared
        • How Smarter Talks to the Cluster
        • Cluster Prerequisites
    • APIs, SDKs and Integrations
      • Smarter APIs, SDKs and Integrations
        • The APIs
        • SDKs and Developer Tools
        • Integrations
        • Design Goals
        • Writing an SDK for Another Language
      • Smarter SDKs
        • Smarter Python SDK
        • Smarter Node.js SDK
        • Smarter Go SDK
      • Smarter Chat
        • Where to Start
        • See Also
      • Smarter Integrations
        • Smarter Chat for WordPress
        • Smarter Chat for Drupal
        • Smarter Chat for Shopify
        • Smarter Chat for Google Tag Manager
        • Smarter Chat for Documentation Sites
    • Extending Smarter
      • Extensibility
        • Plugins, Extensions and MCP Servers Compared
        • Where to Go Next
      • Smarter LLM Tool Extensions
        • An Extension in Brief
    • Developing Smarter
      • Developer Guides
        • Contributing
        • New Feature Checklist
        • Documentation Style Guide & Technical Reference
        • 12-Factor App
        • Code of Conduct
        • Developer Guidelines
        • Semantic Versioning Guide
        • OpenAI
        • OpenAI JSON Examples
        • Claude Code
      • Developer Technical Reference
        • Agentic Development
        • Django-React Integration
        • Web Console Api
        • Translations
        • Smarter Journal
        • Smarter Enumeration Classes
        • Smarter Types
        • Smarter Mixins
        • Smarter Settings
        • Smarter Utils
        • Smarter Devops Guide
        • Smarter Dashboard App
        • Smarter Framework Library
      • Technologies
        • Amazon Web Services (AWS)
        • Docker
        • Infrastructure Services
        • Kubernetes
        • OpenTelemetry Compatibility
        • Python
        • Pydantic
        • SMTP Email Support
        • Tavily Web Search
      • Recommended Learning Materials
    • Open-Source Packages
      • Command Line and Editor
      • SDKs
      • Shared Python Libraries
      • Chat and Web Components
      • Running the Platform
      • Extensions
  • ADR
    • ADR Introduction
      • Guidelines for Writing ADRs
    • ADR-001: Django
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-002: Docker
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-003: Kubernetes
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-004: 12-Factor App
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-005: Manifests
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-006: Rest API
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-007: Settings
      • Status
      • Context
      • Decision
        • Sensitive values
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-008: Function Calling
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-009: Async Tasks
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-010: Management Commands
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-011: Logging
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-012: Error Handling
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-013: Testing
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-014: CI/CD
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-015: Dependency Management
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-016: Security
      • Status
      • Context
      • Decision
      • Inventory
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-017: Database
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-018: Caching
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-019: React
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-020: Semantic Versioning
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-021: Internationalization
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-022: Feature Flags
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-023: API Versioning
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-024: Broker Model
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-025: Django Templates
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-026: Keen Bootstrap
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-027: Python Annotations
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-028: Code Quality
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR 029: Docstring Style
      • Context
      • Alternatives Considered
      • Decision
      • Consequences
      • References
    • ADR-030: Operational and Infrastructure Task Queues
      • Status
      • Context
      • Decision
      • Inventory
      • Security
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-031: Pydantic Models Over Raw JSON
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-032: Url Names Derived From View Classes
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-033: Don’t Repeat Yourself
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-034: The Web Console Api
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-035: The Web Console as a Single-Page App
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-036: Account Hierarchy and Resource Sharing
      • Status
      • Context
      • Decision
        • Worked example: Stackademy
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-037: Orchestration Runtime
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-038: Tool Isolation and Egress Control
      • Status
      • Context
      • Decision
      • Alternatives considered
      • Consequences
      • Plan
      • Decisions for the maintainers
  • Contributors
    • GitHub Repositories
    • Core Contributors
      • Becoming a Core Contributor
    • Community Contributors

External Resources

  • Support Smarter!
  • Smarter OpenAPI Contract
  • Smarter Manifest Examples
  • Smarter Json Schemas
  • Smarter on YouTube
    • The Smarter Project in Five Minutes
    • Up and Running in Less Than 10 Minutes
    • Developer Onboarding: the Development Environment
    • An Introduction to LLM Tool Calling
    • The SqlPlugin in 60 Seconds
    • Teaching Advanced Prompting in 60 Seconds
Smarter Documentation
  • Smarter AI Resource Reference
  • Smarter LLMTool Plugin
  • Django ORM
  • PluginDataImageSearch Model
  • View page source

PluginDataImageSearch Model

PluginDataImageSearch model for storing the configuration of an ImageSearchPlugin.

Note

Experimental. The ImageSearchPlugin was designed and coded by Claude Code (Anthropic’s Claude Opus 5.5), with Lawrence McDaniel as co-author. It is experimental.

class smarter.apps.llmtool.models.plugin_data_image_search.PluginDataImageSearch(*args, **kwargs)[source]

Bases: PluginDataBase

Stores the configuration of an ImageSearchPlugin, which searches the Brave Image Search API and returns image urls.

query_terms are appended to every query that the LLM sends. The search parameters (count, country, search_lang, safesearch and spellcheck) map 1:1 to the Brave Image Search API’s other query parameters. The filters (file_type, min_width, min_height, allowed_domains and blocked_domains) are applied by Smarter to Brave’s results. The Brave Search API key is stored in a Smarter Secret, which is referred to by name, and read when the plugin is called. If it is unavailable then the plugin returns no images, and logs a warning that explains how to create it.

See also

  • PluginDataBase

  • smarter.apps.llmtool.plugin.image_search.ImageSearchPlugin

Parameters:
  • id (Unknown) – Primary key: ID

  • created_at (Unknown) – Created at

  • updated_at (Unknown) – Updated at

  • description (Unknown) – Description. A brief description of what this plugin returns. Be verbose, but not too verbose.

  • parameters (Unknown) – Parameters. A JSON dict containing parameter names and data types. Example: {‘required’: [], ‘properties’: {‘max_cost’: {‘type’: ‘float’, ‘description’: ‘the maximum cost that a student is willing to pay for a course.’}, ‘description’: {‘enum’: [‘AI’, ‘mobile’, ‘web’, ‘database’, ‘network’, ‘neural networks’], ‘type’: ‘string’, ‘description’: ‘areas of specialization for courses in the catalogue.’}}}

  • test_values (Unknown) – Test values. A JSON dict containing test values for each parameter. Example: {‘city’: ‘San Francisco’}

  • api_key_secret_name (Unknown) – Api key secret name. The name of the Secret that contains the Brave Search API key.

  • query_terms (Unknown) – Query terms. Search terms appended to every query that the LLM sends.

  • llm_search_params (Unknown) – Llm search params. Whether the LLM may set every search parameter in each tool call. The others are then defaults.

  • count (Unknown) – Count. The maximum number of images per search.

  • country (Unknown) – Country. A two letter country code, or all for worldwide results.

  • search_lang (Unknown) – Search lang. Prefer images from content in this language, e.g. en.

  • safesearch (Unknown) – Safesearch. Adult content filtering: strict or off.

  • spellcheck (Unknown) – Spellcheck. Whether Brave may correct the spelling of the query.

  • file_type (Unknown) – File type. Only images of these file types, e.g. jpg|png.

  • min_width (Unknown) – Min width. Only images at least this many pixels wide. Images of unknown width are skipped.

  • min_height (Unknown) – Min height. Only images at least this many pixels high. Images of unknown height are skipped.

  • allowed_domains (Unknown) – Allowed domains. If not empty, only images from web pages on these domains, and their subdomains.

  • blocked_domains (Unknown) – Blocked domains. Never images on these domains, nor from web pages on them, including their subdomains.

  • validate_urls (Unknown) – Validate urls. Only return image urls that respond to a request with HTTP 200.

  • timeout (Unknown) – Timeout. Seconds to wait for each web request.

  • cache_ttl (Unknown) – Cache ttl. Seconds to cache search results. 0 disables caching.

Relationship fields:

Parameters:
  • plugin (Unknown) – Plugin (related name: plugin_data_base_plugin)

  • plugindatabase_ptr (Unknown) – Primary key: Plugindatabase ptr (related name: plugindataimagesearch)

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: NotUpdated

allowed_domains

JSONField

Allowed domains. If not empty, only images from web pages on these domains, and their subdomains.

Type:

Type

api_key_secret_name

CharField

Api key secret name. The name of the Secret that contains the Brave Search API key.

Type:

Type

blocked_domains

JSONField

Blocked domains. Never images on these domains, nor from web pages on them, including their subdomains.

Type:

Type

cache_ttl

PositiveIntegerField

Cache ttl. Seconds to cache search results. 0 disables caching.

Type:

Type

count

PositiveSmallIntegerField

Count. The maximum number of images per search.

Type:

Type

country

CharField

Country. A two letter country code, or all for worldwide results.

Type:

Type

data(params=None)[source]

Return the configuration of the plugin, without its api key.

Parameters:

params (dict[str, Any] | None) – Optional parameters for future extensibility (currently unused).

Return type:

dict[str, Any]

Returns:

The configuration.

property domain_policy: DomainPolicy

The plugin’s domain policy, which applies to the web pages that images come from.

file_type

CharField

File type. Only images of these file types, e.g. jpg|png.

Type:

Type

property file_types: list[str]

The permitted file types, e.g. ['jpg', 'png'].

Empty if any file type is permitted.

classmethod get_cached_data_by_plugin(plugin, invalidate=False)[source]

Return a single instance of PluginDataImageSearch by plugin, with caching.

Parameters:
  • plugin (PluginMeta) – The plugin whose data should be retrieved.

  • invalidate (bool) – If True, invalidate the cache before retrieving.

Return type:

PluginDataImageSearch | None

Returns:

The PluginDataImageSearch instance.

Raises:

PluginDataImageSearch.DoesNotExist – If the plugin has no image search data.

classmethod get_cached_object(*args, invalidate=False, pk=None, plugin=None, **kwargs)[source]

Retrieve a model instance by primary key or by plugin, with caching.

Parameters:
  • invalidate (bool | None) – If True, invalidate the cache for this query before retrieving the object.

  • pk (int | None) – The primary key of the model instance to retrieve.

  • plugin (PluginMeta | None) – The PluginMeta instance associated with the data to retrieve.

Return type:

Self | None

Returns:

The model instance.

Raises:

PluginDataImageSearch.DoesNotExist – If the plugin has no image search data.

get_safesearch_display(*, field=<django.db.models.CharField: safesearch>)

Shows the label of the safesearch. See get_FOO_display() for more information.

llm_search_params

BooleanField

Llm search params. Whether the LLM may set every search parameter in each tool call. The others are then defaults.

Type:

Type

manifest_data()[source]

Return the spec.imageSearchData section of the plugin manifest.

Return type:

dict[str, Any]

Returns:

The manifest section, in camelCase.

min_height

PositiveIntegerField

Min height. Only images at least this many pixels high. Images of unknown height are skipped.

Type:

Type

min_width

PositiveIntegerField

Min width. Only images at least this many pixels wide. Images of unknown width are skipped.

Type:

Type

plugindatabase_ptr

OneToOneField to PluginDataBase

Primary key: Plugindatabase ptr (related name: plugindataimagesearch)

Type:

Type

plugindatabase_ptr_id

Internal field, use plugindatabase_ptr instead.

query_terms

CharField

Query terms. Search terms appended to every query that the LLM sends.

Type:

Type

property return_data_keys: list[str]

The plugin returns a list of image urls.

safesearch

CharField

Safesearch. Adult content filtering: strict or off.

Choices:

  • off

  • strict

Type:

Type

sanitized_return_data(params=None)[source]

Return the configuration of the plugin, without its api key.

The image urls are returned by smarter.apps.llmtool.plugin.image_search.ImageSearchPlugin.tool_call_fetch_plugin_response().

Return type:

dict[str, Any]

save(*args, **kwargs)[source]

Normalize the domain lists, validate, and save.

search_lang

CharField

Search lang. Prefer images from content in this language, e.g. en.

Type:

Type

search_params(query=None, count=None, llm_params=None)[source]

Return the Brave Image Search API query parameters.

Parameters:
  • query (str | None) – The LLM’s search query, to which query_terms are appended.

  • count (int | None) – The number of images, which defaults to count. It may not exceed count, or, if llm_search_params, MAX_COUNT.

  • llm_params (dict[str, Any] | None) – The search parameters that the LLM set in its tool call: country, search_lang, safesearch and spellcheck. They are used only if llm_search_params, and invalid values are ignored, in favor of the plugin’s own.

Return type:

dict[str, Any]

Returns:

The query parameters, without empty values.

spellcheck

BooleanField

Spellcheck. Whether Brave may correct the spelling of the query.

Type:

Type

timeout

PositiveSmallIntegerField

Timeout. Seconds to wait for each web request.

Type:

Type

validate()[source]

Validate the configuration.

Raises:

SmarterValueError – If a value is out of range, or a search parameter or filter is not permitted.

Return type:

bool

validate_urls

BooleanField

Validate urls. Only return image urls that respond to a request with HTTP 200.

Type:

Type

smarter.apps.llmtool.models.plugin_data_image_search.valid_or_default(normalize, value, default)[source]

Return a search parameter that the LLM set, normalized, or the default if it is empty or invalid.

Parameters:
  • normalize – The parameter’s normalizer, e.g. normalize_country().

  • value (Any) – The LLM’s value.

  • default (str | None) – The plugin’s own value.

Return type:

str | None

Previous Next

© Copyright 2023 - 2026 Lawrence P. McDaniel. The Smarter Project. Last updated November-2026.

Built with Sphinx using a theme provided by Read the Docs.