Documentation Index
Fetch the complete documentation index at: https://langbear.runbear.io/llms.txt
Use this file to discover all available pages before exploring further.
Initializing LangBear client
Using environment variable
Set LANGBEAR_ENDPOINT environment variable to the endpoint of LangBear server.
from langbear import LangBear
lb = LangBear()
Using parameters
Pass the endpoint to end_point parameter.
from langbear import LangBear
lb = LangBear(end_point="http://localhost:3030")
Adding callback handler
LangBear callback handler tracks the API calls and responses.
Create and pass callback handler to the model:
# LLM
llm = OpenAI(temperature=0.5, callbacks=[lb.callback_handler])
# Chat
chat_llm = ChatOpenAI(temperature=0.5, callbacks=[lb.callback_handler])