AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Port `autogpt.core.resource.model_provider` from AutoGPT to Forge

Open Pwuts opened this issue 1 year ago • 3 comments

  • Actionable for #6970

    Move clear-cut library code from AutoGPT to Forge (or to /dev/null if Forge already has a better version)

    • autogpt.core.resource.model_provider
    • ...

Proposed new module name: forge.llm

Dependencies

  • #7000
  • #7002

TODO

  1. Port autogpt.core.resource.model_provider
  2. Make single interface for client initialization/usage
  3. Check module configuration setup (see below)

Notes

  • Configuration may need revision We want Forge components to be portable and usable as stand-alone imports. Modules should be able to configure themselves if no configuration is passed in. Example: OpenAI's constructor has an api_key parameter. If not set, it will try to read the API key from the OPENAI_API_KEY environment variable.

    Our OpenAIProvider wraps an OpenAI or AzureOpenAI client, depending on the configuration. We think it makes sense to preserve this behavior.

Why migrate this module?

The model_provider module provides functionality and extendability that is not available from any many-model client that we know of, e.g. LiteLLM. We would like to have support for as many models as possible, but:

  • As it is, AutoGPT's prompts are not portable between different model families. Until this is fixed, having access to any number of LLMs / LLM providers doesn't add much value.
  • We are eyeing some opportunities (developing LLM polyfills/middleware) for which having low-level access to the native clients is beneficial. Related: #6969.

Because of these reasons, we want to keep our own client implementation for now.

Pwuts avatar Mar 11 '24 14:03 Pwuts

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

github-actions[bot] avatar May 01 '24 01:05 github-actions[bot]

This issue was closed automatically because it has been stale for 10 days with no activity.

github-actions[bot] avatar May 12 '24 01:05 github-actions[bot]

Unstale @kcze

ntindle avatar May 12 '24 08:05 ntindle