Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitprasad15 authored Sep 25, 2024
1 parent f673f40 commit 0b00f69
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,36 @@ multiple LLMs through a standardized interface. Based on the OpenAI interface st
makes it easy to interact with the most popular LLMs and compare the results of their chat based
functionality, with support for more interfaces coming in the near future.

Currently supported providers are -
OpenAI, Anthropic, Azure, Google, AWS, Groq, Mistral, HuggingFace and Ollama.
Internally, aisuite uses either the HTTP endpoint or the SDK for making calls to the provider.

## Installation

This installs just the base package without installing any provider's SDK.

```shell
pip install aisuite
```

This installs anthropic along with anthropic
```shell
pip install aisuite[anthropic]
```

This installs all the provider specific libraries
```shell
pip install aisuite[all]
```

## Set up

This library provides a thin wrapper around python client libraries to interact with
various Generative AI providers allowing creators to seamlessly swap out or test responses
from a number of LLMs without changing their code.

To get started you will need the API Keys for the providers
you intend to use and install the provider specific library to use.
To get started you will need the API Keys for the providers you intend to use. You also need to
install the provider specific library to use either separately or when installing aisuite.

The API Keys are expected to be in the host ENV and can be set manually or by using a tool such
as [`python-dotenv`](https://pypi.org/project/python-dotenv/) or [`direnv`](https://direnv.net/).
Expand All @@ -35,12 +51,6 @@ export ANTHROPIC_API_KEY="your-anthropic-api-key"
export OPENAI_API_KEY="your-openai-api-key"
```

Install the respective client libraries:

```shell
pip install openai anthropic
```

In your python code:

```python
Expand All @@ -63,13 +73,13 @@ for model in models:
print(response.choices[0].message.content)

```
Note that the model name in the create() call needs to be replaced with `<provider>:<model-name>`
aisuite will call the appropriate provider with the right parameters based on the provider value.
The current list of supported providers can be found by executing `aisuite.ProviderNames.values()`

For more examples, check out the `examples` directory where you will find several
notebooks that you can run to experiment with the interface.

The current list of supported providers can be found in the `aisuite.providers`
package.

## License

aisuite is released under the MIT License. You are free to use, modify, and distribute
Expand Down

0 comments on commit 0b00f69

Please sign in to comment.