tool

anthropic model.

Functions

get_anthropic

Get an anthropic langchain base chat model.

get_anthropic(model='claude-3-5-sonnet-20240620', api_key=None, temperature=0, max_tokens=1024, timeout=None, max_retries=2, **kwargs)[source]

Get an anthropic langchain base chat model.

Parameters:
  • model (str) – Name of the model to use.

  • api_key (Optional[str]) – Api key (if not provided the user is prompted for it).

  • temperature (int) – Temperature.

  • max_tokens (Optional[int]) – Max number of tokens.

  • timeout (Optional[int]) – Timeout.

  • max_retries (int) – Max retries.

  • kwargs – Optional key value arguments.

Return type:

BaseChatModel

Returns:

An anthropic langchain base chat model.