gpt_5_1
What it is
A module-level ChatModel configuration for the gpt-5.1 OpenAI chat model, built with langchain_openai.ChatOpenAI and an API key sourced from ABIModule configuration.
Public API
MODEL_ID: str- Constant model identifier:
"gpt-5.1".
- Constant model identifier:
PROVIDER: str- Constant provider identifier:
"openai".
- Constant provider identifier:
model: naas_abi_core.models.Model.ChatModel- Preconfigured chat model wrapper with:
model_id="gpt-5.1"provider="openai"- underlying
ChatOpenAI(model="gpt-5.1", temperature=0, api_key=SecretStr(...))
- Preconfigured chat model wrapper with:
Configuration/Dependencies
- Dependencies:
langchain_openai.ChatOpenAInaas_abi_core.models.Model.ChatModelnaas_abi_marketplace.ai.chatgpt.ABIModulepydantic.SecretStr
- Configuration requirement:
ABIModule.get_instance().configuration.openai_api_keymust be set (used to buildSecretStrforChatOpenAI.api_key).
Usage
from naas_abi_marketplace.ai.chatgpt.models.gpt_5_1 import model
# `model.model` is the underlying LangChain ChatOpenAI instance.
llm = model.model
# Example call (method availability depends on your LangChain version)
result = llm.invoke("Hello!")
print(result)
Caveats
- Importing this module constructs the
ChatOpenAIinstance immediately; missing/invalidopenai_api_keyinABIModuleconfiguration will cause failures at import time.