Elffuss BraidHub

kikocis/continue public

main · 1.4 KiBRenderedRawPermalink
1# @continuedev/llm-info
2
3A lightweight package providing information about various Large Language Models (LLMs), including embedding, reranking, and other models.
4
5Whereas @continuedev/openai-adapters is responsible for translation between API types, @continuedev/llm-info is concerned with
6
7- Templates
8- Capabilities (e.g. tools, images, streaming, predicted outputs, etc.)
9- Model aliases
10
11and openai-adapters might depend on llm-info for some of these things.
12
13### Goal
14
15We know we are done when the steps required to add support for a new model in Continue are exactly
16
171. editing a single LlmInfo object, and
182. adding it to the supporting ModelProviders.
19
20### Code structure
21
22The two primary types are LlmInfo and ModelProvider
23
24Models are defined on their own in the `models` directory. They can be grouped however makes sense.
25
26Providers are defined in the `providers` directory, with all models that they support in their `models` attribute. It's important that models are tied to providers, because the model might have slightly different attributes (e.g. context length) per provider. Define as much as possible in the base object, and then spread to update for the specific providers as needed.
27
28### Where to use llm-info
29
30- Replace autodetect.ts
31- See usage in `BaseLLM` constructor, and finish the job of using llm-info everywhere relevant.
32- Replace `gui/pages/AddNewModel/configs/[providers/models].ts`