Nebula (Symbl.ai)
This notebook covers how to get started with Nebula - Symbl.ai's chat model.
Integration detailsโ
Head to the API reference for detailed documentation.
Model features: TODOโ
Setupโ
Credentialsโ
To get started, request a Nebula API key and set the NEBULA_API_KEY
environment variable:
import getpass
import os
os.environ["NEBULA_API_KEY"] = getpass.getpass()
Installationโ
The integration is set up in the langchain-community
package.
Instantiationโ
from langchain_community.chat_models.symblai_nebula import ChatNebula
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
chat = ChatNebula(max_tokens=1024, temperature=0.5)
Invocationโ
messages = [
SystemMessage(
content="You are a helpful assistant that answers general knowledge questions."
),
HumanMessage(content="What is the capital of France?"),
]
chat.invoke(messages)
AIMessage(content=[{'role': 'human', 'text': 'What is the capital of France?'}, {'role': 'assistant', 'text': 'The capital of France is Paris.'}])
Asyncโ
await chat.ainvoke(messages)
AIMessage(content=[{'role': 'human', 'text': 'What is the capital of France?'}, {'role': 'assistant', 'text': 'The capital of France is Paris.'}])