You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+68-28
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,28 @@
2
2
3
3
[](https://github.com/samestrin/llm-interface/stargazers)[](https://github.com/samestrin/llm-interface/network/members)[](https://github.com/samestrin/llm-interface/watchers)
4
4
5
-
[](https://opensource.org/licenses/MIT)[](https://nodejs.org/)
5
+
[](https://opensource.org/licenses/MIT)[](https://nodejs.org/)
6
6
7
7
## Introduction
8
8
9
-
`llm-interface`is a wrapper designed to interact with multiple Large Language Model (LLM) APIs. `llm-interface` simplifies integrating various LLM providers, including **OpenAI, AI21 Studio, AIML API, Anthropic, Cloudflare AI, Cohere, DeepInfra, Fireworks AI, Forefront, Friendli AI, Google Gemini, Goose AI, Groq, Hugging Face, Mistral AI, Monster API, Octo AI, Ollama, Perplexity, Reka AI, Replicate, watsonx.ai, Writer, and LLaMA.cpp**, into your applications. It is available as an [NPM package](https://www.npmjs.com/package/llm-interface).
9
+
LLM Interface is an npm module that streamlines your interactions with various Large Language Model (LLM) providers in your Node.js applications. It offers a unified interface, simplifying the process of switching between providers and their models.
10
10
11
-
This goal of `llm-interface` is to provide a single, simple, unified interface for sending messages and receiving responses from different LLM services. This will make it easier for developers to work with multiple LLMs without worrying about the specific intricacies of each API.
11
+
The LLM Interface package offers comprehensive support for a wide range of language model providers, encompassing 36 different providers and hundreds of models. This extensive coverage ensures that you have the flexibility to choose the best models suited to your specific needs.
12
+
13
+
## Extensive Support for 36 Providers and Hundreds of Models
-**Unified Interface**: `LLMInterface.sendMessage` is a single, consistent interface to interact with **24 different LLM APIs** (22 hosted LLM providers and 2 local LLM providers).
25
+
26
+
-**Unified Interface**: `LLMInterface.sendMessage` is a single, consistent interface to interact with **36 different LLM APIs** (34 hosted LLM providers and 2 local LLM providers).
16
27
-**Dynamic Module Loading**: Automatically loads and manages LLM interfaces only when they are invoked, minimizing resource usage.
17
28
-**Error Handling**: Robust error handling mechanisms to ensure reliable API interactions.
18
29
-**Extensible**: Easily extendable to support additional LLM providers as needed.
@@ -23,6 +34,15 @@ This goal of `llm-interface` is to provide a single, simple, unified interface f
-**Caching**: Supports multiple caches: `simple-cache`, `flat-cache`, and `cache-manager`. _`flat-cache` is now an optional package._
41
+
-**Logging**: Improved logging with the `loglevel`.
42
+
-**Improved Documentation**: Improved [documentation](docs/index.md) with new examples, glossary, and provider details. Updated API key details, model alias breakdown, and usage information.
43
+
-**More Examples**: [LangChain.js RAG](examples/langchain/rag.js), [Mixture-of-Authorities (MoA)](examples/moa/moa.js), and [more](docs/examples.md).
44
+
-**Removed Dependency**: `@anthropic-ai/sdk` is no longer required.
45
+
26
46
**v2.0.9**
27
47
28
48
-**New LLM Providers**: Added support for AIML API (_currently not respecting option values_), DeepSeek, Forefront, Ollama, Replicate, and Writer.
@@ -31,59 +51,70 @@ This goal of `llm-interface` is to provide a single, simple, unified interface f
31
51
Octo AI, Ollama, OpenAI, Perplexity, Together AI, and Writer.
If you need [API Keys](/docs/APIKEYS.md), use this [starting point](/docs/APIKEYS.md). Additional [usage examples](/docs/USAGE.md) and an [API reference](/docs/API.md) are available. You may also wish to review the [test cases](/test/) for further examples.
134
+
_LLMInterfaceSendMessage and LLMInterfaceStreamMessage are still available and will be available until version 3_
105
135
106
136
## Running Tests
107
137
@@ -114,13 +144,23 @@ npm test
114
144
#### Current Test Results
115
145
116
146
```bash
117
-
Test Suites: 1 skipped, 65 passed, 65 of 66 total
118
-
Tests: 2 skipped, 291 passed, 293 total
147
+
Test Suites: 9 skipped, 93 passed, 93 of 102 total
148
+
Tests: 86 skipped, 784 passed, 870 total
119
149
Snapshots: 0 total
120
-
Time: 103.293 s, estimated 121 s
150
+
Time: 630.029 s
121
151
```
122
152
123
-
_Note: Currently skipping NVIDIA test cases due to API key limits._
153
+
_Note: Currently skipping NVIDIA test cases due to API issues, and Ollama due to performance issues._
0 commit comments