gpt_4o
What it is
- A non-functional template for configuring a GPT-4o (
ChatOpenAI) model intended for the “Project Manager” domain. - Includes placeholder wiring for retrieving
OPENAI_API_KEYvianaas_abi.secretand logging vianaas_abi_core.logger.
Public API
create_model() -> ChatOpenAI | None- Logs a warning that this is a template.
- Reads
OPENAI_API_KEYviasecret.get("OPENAI_API_KEY"). - Returns:
- A configured
ChatOpenAIinstance when the API key is present. Noneand logs an error when the API key is missing.
- A configured
model: None- Module-level placeholder; currently not initialized (comment indicates it “would be: create_model()`).
Configuration/Dependencies
- Dependencies:
langchain_openai.ChatOpenAInaas_abi.secret(forsecret.get)naas_abi_core.logger
- Required secret:
OPENAI_API_KEY
- Model configuration used in
create_model():model="gpt-4o"temperature=0max_tokens=4000frequency_penalty=0.1presence_penalty=0.1
Usage
from naas_abi_marketplace.domains.project_manager.models.gpt_4o import create_model
model = create_model()
if model is None:
raise RuntimeError("Missing OPENAI_API_KEY")
# Example usage depends on langchain_openai APIs; model is a ChatOpenAI instance.
Caveats
- The module is explicitly marked “NOT FUNCTIONAL YET” and logs a warning on
create_model()calls. - The exported
modelvariable is alwaysNonein the current file (not auto-created).