bio_reasoning.layers.b.visual_describer module#

bio_reasoning.layers.b.visual_describer.visual_describer_factory(api_key: str, api_base_url: str, model_name: str = 'gpt-4.1', system_prompt: str | None = None) Callable[[str | List[str], str], str][source]#

Factory function to create a visual description function with provided configuration.

Parameters:
  • api_key (str) – The API key for authentication.

  • api_base_url (str) – The base URL of the API providing the visual description service.

  • model_name (str, optional) – Name of the model. Defaults to ‘gpt-4.1’.

  • system_prompt (str, optional) – A prompt to set the system context. Defaults to None.

Returns:

A function that accepts image URIs and user prompt to generate a visual description.

Return type:

Callable[[Union[str, List[str]], str], str]