> ## 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.

# Initialize

> Initialize LangBear client to start using it.

## Initializing LangBear client

### Using environment variable

Set `LANGBEAR_ENDPOINT` environment variable to the endpoint of LangBear server.

<CodeGroup>
  ```python python theme={null}
  from langbear import LangBear

  lb = LangBear()
  ```

  ```typescript typescript theme={null}
  TBD;
  ```
</CodeGroup>

### Using parameters

Pass the endpoint to `end_point` parameter.

<CodeGroup>
  ```python python theme={null}
  from langbear import LangBear

  lb = LangBear(end_point="http://localhost:3030")
  ```

  ```typescript typescript theme={null}
  TBD;
  ```
</CodeGroup>

## Adding callback handler

LangBear callback handler tracks the API calls and responses.

Create and pass callback handler to the model:

<CodeGroup>
  ```python python theme={null}
  # LLM
  llm = OpenAI(temperature=0.5, callbacks=[lb.callback_handler])

  # Chat
  chat_llm = ChatOpenAI(temperature=0.5, callbacks=[lb.callback_handler])
  ```

  ```typescript typescript theme={null}
  ```
</CodeGroup>
