gpt_4o
What it is
- A non-functional template for configuring a
gpt-4ochat model (vialangchain_openai.ChatOpenAI) for the Sales Development Representative domain. - Emits warnings/errors via
naas_abi_core.loggerand reads the OpenAI key vianaas_abi.secret.
Public API
create_model() -> ChatOpenAI | None- Logs a warning that this is not functional yet.
- Retrieves
OPENAI_API_KEYviasecret.get("OPENAI_API_KEY"). - Returns:
- A configured
ChatOpenAIinstance if the API key is present. Noneif the API key is missing (and logs an error).
- A configured
- Module attribute:
model- Currently set to
None(comment indicates it “would be:create_model()”).
- Currently set to
Configuration/Dependencies
- Dependencies:
langchain_openai.ChatOpenAInaas_abi.secret(expectssecret.get("OPENAI_API_KEY"))naas_abi_core.logger
- Model configuration used in
create_model():model="gpt-4o"temperature=0.2max_tokens=4000api_key=<OPENAI_API_KEY>
Usage
from naas_abi_marketplace.domains.sales-development-representative.models.gpt_4o import create_model
llm = create_model()
if llm is None:
raise RuntimeError("Missing OPENAI_API_KEY")
# Example: in LangChain, you would typically call llm.invoke(...) with messages,
# but this module only provides the model factory.
Caveats
- The module is explicitly marked “NOT FUNCTIONAL YET” and logs a warning on
create_model(). - The exported
modelvariable is alwaysNonein the current code (no automatic initialization). - If
OPENAI_API_KEYis not available vianaas_abi.secret,create_model()returnsNone.