Alex Bäuerle cd58194d2a
docs(docs): start implementing docs website (#1372)
* docs(docs): start implementing docs website

* update video url

* add autogenerated codebase docs for backend

* precommit

* update links

* fix config and video

* gh actions

* rename

* workdirs

* path

* path

* fix doc1

* redo markdown

* docs

* change main folder name

* simplify readme

* add back architecture

* Fix lint errors

* lint

* update poetry lock

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-04-29 10:00:51 -07:00

1.9 KiB

sidebar_label, title
sidebar_label title
llm opendevin.llm.llm

LLM Objects

class LLM()

The LLM class represents a Language Model instance.

__init__

def __init__(model=DEFAULT_MODEL_NAME,
             api_key=DEFAULT_API_KEY,
             base_url=DEFAULT_BASE_URL,
             api_version=DEFAULT_API_VERSION,
             num_retries=LLM_NUM_RETRIES,
             retry_min_wait=LLM_RETRY_MIN_WAIT,
             retry_max_wait=LLM_RETRY_MAX_WAIT,
             llm_timeout=LLM_TIMEOUT,
             llm_max_return_tokens=LLM_MAX_RETURN_TOKENS)

Arguments:

  • model str, optional - The name of the language model. Defaults to LLM_MODEL.
  • api_key str, optional - The API key for accessing the language model. Defaults to LLM_API_KEY.
  • base_url str, optional - The base URL for the language model API. Defaults to LLM_BASE_URL. Not necessary for OpenAI.
  • api_version str, optional - The version of the API to use. Defaults to LLM_API_VERSION. Not necessary for OpenAI.
  • num_retries int, optional - The number of retries for API calls. Defaults to LLM_NUM_RETRIES.
  • retry_min_wait int, optional - The minimum time to wait between retries in seconds. Defaults to LLM_RETRY_MIN_TIME.
  • retry_max_wait int, optional - The maximum time to wait between retries in seconds. Defaults to LLM_RETRY_MAX_TIME.
  • llm_timeout int, optional - The maximum time to wait for a response in seconds. Defaults to LLM_TIMEOUT.
  • llm_max_return_tokens int, optional - The maximum number of tokens to return. Defaults to LLM_MAX_RETURN_TOKENS.

Attributes:

  • model_name str - The name of the language model.
  • api_key str - The API key for accessing the language model.
  • base_url str - The base URL for the language model API.
  • api_version str - The version of the API to use.

completion

@property
def completion()

Decorator for the litellm completion function.