LogoLogo
HomeNewsSupportVideos
  • Welcome
  • Wisej.NET
  • Concepts
    • Getting Started
    • General Concepts
    • Architecture
    • Extensibility
    • AI Providers
    • Vector Databases
    • Usage Metrics
    • Logging & Error Handling
  • Markup
  • Components
    • API
      • SmartAdapter
        • SmartAudioTTSAdapter
        • SmartAudioWhisperAdapter
        • SmartCalendarAdapter
        • SmartChartAdapter
        • SmartChartJS3Adapter
        • SmartChatBoxAdapter
        • SmartComboBoxAdapter
        • SmartCopilotAdapter
        • SmartDataEntryAdapter
        • SmartDocumentAdapter
        • SmartFullCalendarAdapter
        • SmartObjectAdapter
        • SmartPictureBoxAdapter
        • SmartQueryAdapter
        • SmartRealtimeAdapter
        • SmartReportAdapter
        • SmartTextBoxAdapter
        • SmartAdapter.ExtendsAttribute
        • SmartAdapter.FieldNameAttribute
        • SmartAdapter.FieldPromptAttribute
        • SmartAdapter.FieldRectangleAttribute
        • SmartAdapter.WorksWithAttribute
      • SmartEndpoint
        • AmazonBedrockEndpoint
        • AnthropicEndpoint
        • AzureAIEndpoint
        • CerebrasEndpoint
        • DeepSeekEndpoint
        • GoogleAIEndpoint
        • GroqCloudEndpoint
        • GroqCloudEndpointWhisper
        • HuggingFaceEndpoint
        • HuggingFaceJavaScriptEndpoint
        • LocalAIEndpoint
        • LocalAIEndpointImageGen
        • LocalAIEndpointTTS
        • LocalAIEndpointWhisper
        • NvidiaAIEndpoint
        • OllamaEndpoint
        • OpenAIEndpoint
        • OpenAIEndpointDallE
        • OpenAIEndpointRealtime
        • OpenAIEndpointTTS
        • OpenAIEndpointWhisper
        • SambaNovaEndpoint
        • SmartHttpEndpoint
        • TogetherAIEndpoint
        • XAIEndpoint
        • SmartEndpoint.Metrics
        • SmartEndpoint.Response
      • SmartExtensions
      • SmartHub
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartObject
      • SmartPrompt
        • SmartAgentPrompt
        • SmartParallelPrompt
        • SmartPrompt.Parameter
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartRealtimeSession
      • SmartSession
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.Message
        • SmartSession.MessageCollection
        • SmartSession.MessageRole
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
        • SmartSession.TrimmingStrategy
      • SmartTool
        • SmartTool.IToolProvider
        • SmartTool.ToolAttribute
        • SmartTool.ToolContext
      • Markup
        • MarkupExtensions
      • Controls
        • UVLightOverlay
      • Embeddings
        • EmbeddedDocument
        • Embedding
        • Matches
        • Metadata
      • Helpers
        • ApiKeys
        • Markdown
        • TextTokenizer
      • Services
        • DefaultSessionTrimmingService
        • IDocumentConversionService
          • DefaultDocumentConversionService
        • IEmbeddingGenerationService
          • DefaultEmbeddingGenerationService
          • HuggingFaceEmbeddingGenerationService
        • IEmbeddingStorageService
          • AzureAISearchEmbeddingStorageService
          • ChromaEmbeddingStorageService
          • FileSystemEmbeddingStorageService
          • MemoryEmbeddingStorageService
          • PineconeEmbeddingStorageService
          • QdrantEmbeddingStorageService
        • IHttpClientService
          • DefaultHttpClientService
        • ILoggerService
          • DefaultLoggerService
        • IOCRService
          • DefaultOCRService
        • IRerankingService
          • DefaultRerankingService
          • LocalAIRerankingService
          • PineconeRerankingService
        • ISessionTrimmingService
          • DefaultSessionTrimmingService
        • ITextSplitterService
          • RecursiveCharacterTextSplitterService
          • TextSplitterServiceBase
        • ITokenizerService
          • DefaultTokenizerService
        • IWebSearchService
          • BingWebSearchService
          • BraveWebSearchService
          • GoogleWebSearchService
      • Tools
        • ArxivTools
        • ChartJS3Tools
        • DatabaseTools
        • DataTableFilterTools
        • DocumentSearchTools
        • DocumentTools
        • FullCalendarTools
        • IToolsContainer
        • MathTools
        • ToolsContainer
        • UtilityTools
        • WebSearchTools
    • Built-in Services
      • IOCRService
      • ILoggerService
      • ITextSplitterService
      • ITokenizerService
      • IHttpClientService
      • IWebSearchService
      • IRerankingService
      • ISessionTrimmingService
      • IDocumentConversionService
      • IEmbeddingStorageService
      • IEmbeddingGenerationService
    • Built-in SmartTools
      • ToolsContainer
      • MathTools
      • UtilityTools
      • DatabaseTools
      • DocumentTools
      • DocumentSearchTools
      • WebSearchTools
      • ChartJS3Tools
      • FullCalendarTools
    • Built-in SmartAdapters
      • SmartAdapter
      • SmartAudioTTSAdapter
      • SmartAudioWhisperAdapter
      • SmartCalendarAdapter
      • SmartChartAdapter
      • SmartChartJS3Adapter
      • SmartChatBoxAdapter
      • SmartComboBoxAdapter
      • SmartCopilotAdapter
      • SmartDataEntryAdapter
      • SmartDocumentAdapter
      • SmartFullCalendarAdapter
      • SmartObjectAdapter
      • SmartPictureBoxAdapter
      • SmartQueryAdapter
      • SmartRealtimeAdapter
      • SmartReportAdapter
      • SmartTextBoxAdapter
    • Configure Services
    • Using SmartHub
    • Using SmartTools
    • Using SmartPrompt
    • Using SmartSession
    • Using SmartRealTimeAdapter
    • UVLightOverlay Control
Powered by GitBook
On this page
  • Constructors
  • GoogleAIEndpoint()
  • Properties
  • Authentication
  • EmbeddingModel
  • Model
  • URL
  • Methods
  • AddMessages(payload, session, messages)
  • AddOptions(message, session)
  • BuildEmbeddingsPayload(inputs)
  • GetApiURL()
  • GetEmbeddingsURL()
  • ReadAssistantMessage(response, message)
  • ReadEmbeddingsResponse(response)
  • ReadUsage(message, reply)
Export as PDF
  1. Components
  2. API
  3. SmartEndpoint

GoogleAIEndpoint

Wisej.AI.Endpoints.GoogleAIEndpoint

PreviousDeepSeekEndpointNextGroqCloudEndpoint

Last updated 5 days ago

Namespace: Wisej.AI.Endpoints

Assembly: Wisej.AI (3.5.0.0)

Represents a connection to Google AI endpoints for generating content and embeddings.

public class GoogleAIEndpoint : SmartHttpEndpoint
Public Class GoogleAIEndpoint
    Inherits SmartHttpEndpoint

This class is used to interact with Google AI services, allowing for content generation and text embeddings. It extends the to provide specific functionality for Google AI.

Constructors

GoogleAIEndpoint()

Initializes a new instance of the class with default settings.

Properties

Authentication

: Gets or sets the authentication token for accessing the Google AI endpoint. (Default: null)

Methods

Adds messages to the payload for processing.

Parameter
Type
Description

payload

The payload to which messages are added.

session

The current session.

messages

The list of messages to be processed.

Throws:

Adds options to the message for content generation.

Parameter
Type
Description

message

The message to which options are added.

session

The current session containing model options.

This method configures the generation parameters such as temperature and max output tokens. It also incorporates any additional model options from the session.

Builds the payload for embedding requests.

Parameter
Type
Description

inputs

The array of input strings to be embedded.

Throws:

Constructs the API URL for content generation requests.

Constructs the API URL for embedding requests.

Reads the assistant's message from the response.

Parameter
Type
Description

response

The response containing the assistant's message.

message

The message object to populate with the assistant's response.

Throws:

Reads the embeddings response and extracts the embedding vectors.

Parameter
Type
Description

response

The response containing the embeddings data.

Throws:

Reads the usage data from the reply and updates the message usage.

Parameter
Type
Description

message

The message to update with usage data.

reply

The reply containing usage metadata.

EmbeddingModel

: Gets or sets the model used for text embeddings. (Default: "text-embedding-004")

Model

: Gets or sets the model used for content generation. (Default: "gemini-1.5-pro-latest")

URL

: Gets or sets the base URL for the Google AI endpoint. (Default: "https://generativelanguage.googleapis.com/v1beta/models")

AddMessages(payload, session, messages)

Thrown when session , payload , or messages is null.

AddOptions(message, session)

BuildEmbeddingsPayload(inputs)

Returns: . The constructed payload object for embedding requests.

Thrown when inputs is null.

GetApiURL()

Returns: . The constructed API URL as a string.

GetEmbeddingsURL()

Returns: . The constructed embeddings URL as a string.

ReadAssistantMessage(response, message)

Thrown when response or message is null.

ReadEmbeddingsResponse(response)

Returns: . An array of float arrays representing the embedding vectors.

Thrown when response is null.

ReadUsage(message, reply)

String
String
String
ArgumentNullException
Object
ArgumentNullException
String
String
ArgumentNullException
Single[][]
ArgumentNullException
Object
SmartSession
IList<Message>
Object
SmartSession
String[]
Response
Message
Response
Message
Object
SmartEndpoint
SmartHttpEndpoint
GoogleAIEndpoint
SmartHttpEndpoint
GoogleAIEndpoint
String