gpt_4o (Private Investigator model template)
What it is
- A non-functional template for configuring a
gpt-4oChatOpenAImodel intended for the Private Investigator domain. - Provides a
create_model()factory that:- Logs a warning that it’s not functional yet.
- Loads
OPENAI_API_KEYfromnaas_abi.secret. - Returns a configured
ChatOpenAIinstance, orNoneif the key is missing.
Public API
create_model() -> ChatOpenAI | None- Creates and returns a
ChatOpenAIconfigured with:model="gpt-4o"temperature=0.1max_tokens=4000
- Returns
NoneifOPENAI_API_KEYis not available.
- Creates and returns a
- Module variable:
model- Currently set to
None(placeholder; not initialized).
- Currently set to
Configuration/Dependencies
- Environment/Secrets:
OPENAI_API_KEYmust be available vianaas_abi.secret.get("OPENAI_API_KEY").
- Dependencies:
langchain_openai.ChatOpenAInaas_abi.secretnaas_abi_core.logger
Usage
from naas_abi_marketplace.domains.private_investigator.models.gpt_4o import create_model
model = create_model()
if model is None:
raise RuntimeError("Missing OPENAI_API_KEY")
# Example call (LangChain interface)
response = model.invoke("Summarize the key facts from this case note.")
print(response)
Caveats
- Marked as NOT FUNCTIONAL YET in the module docstring and via a runtime warning.
- The module-level
modelis not created automatically (model = None). - If
OPENAI_API_KEYis missing,create_model()logs an error and returnsNone.