Skip to main content

SearchResultContent

Search result content for grounding LLM responses with web search data.

Import

import type { SearchResultContent } from '@adaline/api';

Type Definition

interface SearchResultContent {
  modality: 'search-result';
  value: SearchResultGoogleContentValue;
}

interface SearchResultGoogleContentValue {
  type: 'google';
  references: Array<{ title: string; url: string; snippet: string }>;
  responses: Array<{ text: string }>;
}

Fields

modality
string
required
Must be "search-result".
value
SearchResultGoogleContentValue
required
Google search result value with type (always "google"), references array of search results, and responses array of grounding text.

Example

import type { SearchResultContent } from '@adaline/api';

const searchResult: SearchResultContent = {
  modality: 'search-result',
  value: {
    type: 'google',
    references: [
      {
        title: 'Example Article',
        url: 'https://example.com/article',
        snippet: 'Relevant excerpt from the article...'
      }
    ],
    responses: [
      { text: 'Search grounding result based on web data.' }
    ]
  }
};
JSON:
{
  "modality": "search-result",
  "value": {
    "type": "google",
    "references": [
      {
        "title": "Example Article",
        "url": "https://example.com/article",
        "snippet": "Relevant excerpt from the article..."
      }
    ],
    "responses": [
      { "text": "Search grounding result based on web data." }
    ]
  }
}