gpt_4o
What it is
- A non-functional template for configuring a
gpt-4oChatOpenAImodel intended for the Account Executive domain. - Provides a
create_model()factory that retrievesOPENAI_API_KEYfromnaas_abi.secretand builds aChatOpenAIclient.
Public API
-
create_model() -> ChatOpenAI | None- Logs a warning that the model is a template.
- Reads
OPENAI_API_KEYviasecret.get("OPENAI_API_KEY"). - Returns:
- a configured
ChatOpenAIinstance if the key exists Noneif the key is missing (and logs an error)
- a configured
-
Module attribute:
model- Currently set to
None(placeholder; not initialized).
- Currently set to
Configuration/Dependencies
- Dependencies:
langchain_openai.ChatOpenAInaas_abi.secret(expectssecret.get(...))naas_abi_core.logger
- Required secret:
OPENAI_API_KEYmust be available viasecret.get("OPENAI_API_KEY")
- Model configuration used in
create_model():model="gpt-4o"temperature=0.2max_tokens=4000
Usage
from naas_abi_marketplace.domains.account_executive.models import gpt_4o
llm = gpt_4o.create_model()
if llm is None:
raise RuntimeError("Missing OPENAI_API_KEY")
# Use `llm` per langchain_openai.ChatOpenAI conventions.
Caveats
- The module is explicitly marked "NOT FUNCTIONAL YET" and logs a warning on
create_model(). modelis not automatically created (it is hard-coded toNone).