Skip to main content

genai_functions.py

Source: sunholo/vertex/genai_functions.py

Functions

genai_structured_output(openapi_spec, system_prompt: str = '', model_name: str = 'models/gemini-1.5-pro', **kwargs)

Generate AI function output with the specified configuration.

Parameters:

  • output_schema: The schema for the response output.
  • system_prompt: Optional system prompt to guide the generation.
  • model_name: The name of the model to use (default is 'models/gemini-1.5-flash').
  • output_schema_json: The JSON schema with descriptions.
  • **kwargs: Additional keyword arguments to customize the generation config.

Returns:

  • model: The configured generative model.
Sunholo Multivac

Get in touch to see if we can help with your GenAI project.

Contact us

Other Links

Sunholo Multivac - GenAIOps

Copyright ©

Holosun ApS 2024