bio_reasoning.layers.a package#

Layer A is the parametric memory of a general large language model (LLM), capturing broadly applicable knowledge pre-trained or fine-tuned into its weights.

bio_reasoning.layers.a.parametric_memory_factory(api_key: str, api_base_url: str, model_name: str, system_prompt: str) Callable[[str], str][source]#

Factory function to create a parametric memory function with the provided configuration.

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

  • api_base_url (str) – The base URL of the API providing completion services.

  • model_name (str) – The name of the model to use for generating responses.

  • system_prompt (str) – A prompt to set the system context.

Returns:

A function that takes a user prompt and returns a model’s response.

Return type:

Callable[[str], str]

Submodules#