Skip to content

Commit

Permalink
New package name
Browse files Browse the repository at this point in the history
  • Loading branch information
standsleeping committed Sep 1, 2024
1 parent e309abd commit 97ec95b
Show file tree
Hide file tree
Showing 22 changed files with 50 additions and 50 deletions.
32 changes: 16 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- omit in toc -->
# Contributing to aimodels
# Contributing to aisuite

First off, thanks for taking the time to contribute!

Expand Down Expand Up @@ -33,15 +33,15 @@ and smooth out the experience for all involved. The community looks forward to y
## I Have a Question

> If you want to ask a question, we assume that you have read the available
> [Documentation](https://github.com/andrewyng/aimodels/blob/main/README.md).
> [Documentation](https://github.com/andrewyng/aisuite/blob/main/README.md).
Before you ask a question, it is best to search for existing [Issues](https://github.com/andrewyng/aimodels/issues)
Before you ask a question, it is best to search for existing [Issues](https://github.com/andrewyng/aisuite/issues)
that might help you. In case you have found a suitable issue and still need clarification, you can write
your question in this issue. It is also advisable to search the internet for answers first.

If you then still feel the need to ask a question and need clarification, we recommend the following:

- Open an [Issue](https://github.com/andrewyng/aimodels/issues/new).
- Open an [Issue](https://github.com/andrewyng/aisuite/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (python, OS, etc.), depending on what seems relevant.

Expand All @@ -66,10 +66,10 @@ complete the following steps in advance to help us fix any potential bug as fast

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment
components/versions (Make sure that you have read the [documentation](https://github.com/andrewyng/aimodels/blob/main/README.md).
components/versions (Make sure that you have read the [documentation](https://github.com/andrewyng/aisuite/blob/main/README.md).
If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having,
check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/andrewyng/aimodels?q=label%3Abug).
check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/andrewyng/aisuite?q=label%3Abug).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub
community have discussed the issue.
- Collect information about the bug:
Expand All @@ -89,7 +89,7 @@ complete the following steps in advance to help us fix any potential bug as fast
We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open an [Issue](https://github.com/andrewyng/aimodels/issues/new). (Since we can't be sure at
- Open an [Issue](https://github.com/andrewyng/aisuite/issues/new). (Since we can't be sure at
this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can
Expand All @@ -112,31 +112,31 @@ Please use the issue templates provided.

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for aimodels,
This section guides you through submitting an enhancement suggestion for aisuite,
**including completely new features and minor improvements to existing functionality**. Following these
guidelines will help maintainers and the community to understand your suggestion and find related suggestions.

<!-- omit in toc -->
#### Before Submitting an Enhancement

- Make sure that you are using the latest version.
- Read the [documentation](https://github.com/andrewyng/aimodels/blob/main/README.md) carefully
- Read the [documentation](https://github.com/andrewyng/aisuite/blob/main/README.md) carefully
and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/andrewyng/aimodels/issues) to see if the enhancement has
- Perform a [search](https://github.com/andrewyng/aisuite/issues) to see if the enhancement has
already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong
case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.

<!-- omit in toc -->
#### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://github.com/andrewyng/aimodels/issues).
Enhancement suggestions are tracked as [GitHub issues](https://github.com/andrewyng/aisuite/issues).

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
At this point you can also tell which alternatives do not work for you.
- **Explain why this enhancement would be useful** to most aimodels users. You may also want to
- **Explain why this enhancement would be useful** to most aisuite users. You may also want to
point out the other projects that solved it better and which could serve as inspiration.


Expand All @@ -145,10 +145,10 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/andrew
#### Pre-requisites

You should first [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
the `aimodels` repository and then clone your forked repository:
the `aisuite` repository and then clone your forked repository:

```bash
git clone https://github.com/<YOUR_GITHUB_USER>/aimodels.git
git clone https://github.com/<YOUR_GITHUB_USER>/aisuite.git
```


Expand All @@ -164,7 +164,7 @@ Please install the development and test dependencies:
poetry install --with dev,test
```

`aimodels` uses pre-commit to ensure the formatting is consistent:
`aisuite` uses pre-commit to ensure the formatting is consistent:
```bash
pre-commit install
```
Expand All @@ -185,7 +185,7 @@ pass, so please make sure it passes locally.


#### Testing
`aimodels` tracks unit tests. Pytest is used to execute said unit tests in `tests/`:
`aisuite` tracks unit tests. Pytest is used to execute said unit tests in `tests/`:

```bash
poetry run pytest tests
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# aimodels
# aisuite

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Simple, unified interface to multiple Generative AI providers.

`aimodels` is an tool designed for researchers who need to evaluate and compare the responses of
multiple LLMs through a standardized interface. Based on the OpenAI interface standard, `aimodels`
`aisuite` is an tool designed for researchers who need to evaluate and compare the responses of
multiple LLMs through a standardized interface. Based on the OpenAI interface standard, `aisuite`
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.

## Installation

```shell
pip install aimodels
pip install aisuite
```

## Set up
Expand Down Expand Up @@ -44,7 +44,7 @@ pip install openai anthropic
In your python code:

```python
import aimodels as ai
import aisuite as ai
client = ai.Client()

models = ["openai:gpt-4o", "anthropic:claude-3-5-sonnet-20240620"]
Expand All @@ -67,12 +67,12 @@ for model in models:
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 `aimodels.providers`
The current list of supported providers can be found in the `aisuite.providers`
package.

## License

aimodels is released under the MIT License. You are free to use, modify, and distribute
aisuite is released under the MIT License. You are free to use, modify, and distribute
the code for both commercial and non-commercial purposes.

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion aisuite/framework/chat_completion_response.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from aimodels.framework.choice import Choice
from aisuite.framework.choice import Choice


class ChatCompletionResponse:
Expand Down
2 changes: 1 addition & 1 deletion aisuite/framework/choice.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from aimodels.framework.message import Message
from aisuite.framework.message import Message


class Choice:
Expand Down
2 changes: 1 addition & 1 deletion aisuite/providers/anthropic_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os

from aimodels.framework import ProviderInterface, ChatCompletionResponse
from aisuite.framework import ProviderInterface, ChatCompletionResponse


class AnthropicInterface(ProviderInterface):
Expand Down
2 changes: 1 addition & 1 deletion aisuite/providers/google_interface.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""The interface to Google's Vertex AI."""

import os
from aimodels.framework import ProviderInterface, ChatCompletionResponse
from aisuite.framework import ProviderInterface, ChatCompletionResponse


class GoogleInterface(ProviderInterface):
Expand Down
2 changes: 1 addition & 1 deletion aisuite/providers/mistral_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from aimodels.framework import ProviderInterface
from aisuite.framework import ProviderInterface


class MistralInterface(ProviderInterface):
Expand Down
2 changes: 1 addition & 1 deletion aisuite/providers/ollama_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""The interface to the Ollama API."""

from aimodels.framework import ProviderInterface, ChatCompletionResponse
from aisuite.framework import ProviderInterface, ChatCompletionResponse
from httpx import ConnectError
import os

Expand Down
8 changes: 4 additions & 4 deletions examples/RAG.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/ksolo/Library/Caches/pypoetry/virtualenvs/aimodels-HUywTnIy-py3.12/lib/python3.12/site-packages/sentence_transformers/evaluation/SentenceEvaluator.py:81: SyntaxWarning: invalid escape sequence '\\g'\n",
"/Users/ksolo/Library/Caches/pypoetry/virtualenvs/aisuite-HUywTnIy-py3.12/lib/python3.12/site-packages/sentence_transformers/evaluation/SentenceEvaluator.py:81: SyntaxWarning: invalid escape sequence '\\g'\n",
" return re.sub(r\"([a-z])([A-Z])\", \"\\g<1> \\g<2>\", class_name)\n",
"/Users/ksolo/Library/Caches/pypoetry/virtualenvs/aimodels-HUywTnIy-py3.12/lib/python3.12/site-packages/sentence_transformers/model_card.py:524: SyntaxWarning: invalid escape sequence '\\d'\n",
"/Users/ksolo/Library/Caches/pypoetry/virtualenvs/aisuite-HUywTnIy-py3.12/lib/python3.12/site-packages/sentence_transformers/model_card.py:524: SyntaxWarning: invalid escape sequence '\\d'\n",
" if dataset_name and re.match(\"_dataset_\\d+\", dataset_name):\n",
"/Users/ksolo/Library/Caches/pypoetry/virtualenvs/aimodels-HUywTnIy-py3.12/lib/python3.12/site-packages/sentence_transformers/losses/DenoisingAutoEncoderLoss.py:16: SyntaxWarning: invalid escape sequence '\\_'\n",
"/Users/ksolo/Library/Caches/pypoetry/virtualenvs/aisuite-HUywTnIy-py3.12/lib/python3.12/site-packages/sentence_transformers/losses/DenoisingAutoEncoderLoss.py:16: SyntaxWarning: invalid escape sequence '\\_'\n",
" \"\"\"\n"
]
}
Expand Down Expand Up @@ -157,7 +157,7 @@
"\n",
"prompt = f'Given the following data, Please answer the question: \\n\\n ##question \\n {question}\\n\\n ##context \\n {context}'\n",
"\n",
"import aimodels as ai\n",
"import aisuite as ai\n",
"client = ai.Client()\n",
"\n",
"messages = [\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"source": [
"import sys\n",
"sys.path.append('../../aimodels')\n",
"sys.path.append('../../aisuite')\n",
"\n",
"from dotenv import load_dotenv, find_dotenv\n",
"\n",
Expand Down Expand Up @@ -77,7 +77,7 @@
},
"outputs": [],
"source": [
"import aimodels as ai\n",
"import aisuite as ai\n",
"\n",
"client = ai.Client()\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/llm_reasoning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
],
"source": [
"import sys\n",
"sys.path.append('../../aimodels')\n",
"sys.path.append('../../aisuite')\n",
"\n",
"from dotenv import load_dotenv, find_dotenv\n",
"\n",
Expand Down Expand Up @@ -102,7 +102,7 @@
"metadata": {},
"outputs": [],
"source": [
"import aimodels as ai\n",
"import aisuite as ai\n",
"\n",
"client = ai.Client()"
]
Expand Down
6 changes: 3 additions & 3 deletions guides/google.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Google (Vertex) AI

To use Google (Vertex) AI with the `aimodels` library, you'll first need to create a Google Cloud account and set up your environment to work with Google Cloud.
To use Google (Vertex) AI with the `aisuite` library, you'll first need to create a Google Cloud account and set up your environment to work with Google Cloud.

## Create a Google Cloud Account and Project

Expand All @@ -26,7 +26,7 @@ Set the `GOOGLE_REGION` environment variable to the ID of your project. You can

## Create a Service Account For API Access

Because `aimodels` needs to authenticate with Google Cloud to access the Vertex AI API, you'll need to create a service account and set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of a JSON file containing the service account's credentials, which you can download from the Google Cloud Console.
Because `aisuite` needs to authenticate with Google Cloud to access the Vertex AI API, you'll need to create a service account and set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of a JSON file containing the service account's credentials, which you can download from the Google Cloud Console.

This is documented [here](https://cloud.google.com/docs/authentication/provide-credentials-adc#how-to), and the basic steps are as follows:

Expand Down Expand Up @@ -71,7 +71,7 @@ pip install vertexai
In your code:

```python
import aimodels as ai
import aisuite as ai
client = ai.Client()

model="vertex:gemini-1.5-pro-001"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "aimodels"
name = "aisuite"
version = "0.1.0"
description = ""
authors = ["Andrew Ng"]
Expand Down
2 changes: 1 addition & 1 deletion tests/client/test_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from aimodels.client.client import Client, AnthropicInterface
from aisuite.client.client import Client, AnthropicInterface


def test_get_provider_interface_with_new_instance():
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_anthropic_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from unittest.mock import patch, MagicMock
from aimodels.providers.anthropic_interface import AnthropicInterface
from aisuite.providers.anthropic_interface import AnthropicInterface


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_fireworks_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from unittest.mock import patch, MagicMock
from aimodels.providers.fireworks_interface import FireworksInterface
from aisuite.providers.fireworks_interface import FireworksInterface


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_google_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from unittest.mock import patch, MagicMock
from aimodels.providers.google_interface import GoogleInterface
from aisuite.providers.google_interface import GoogleInterface
from vertexai.generative_models import Content, Part


Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_groq_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from unittest.mock import patch, MagicMock
from aimodels.providers.groq_interface import GroqInterface
from aisuite.providers.groq_interface import GroqInterface


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_mistral_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from mistralai.models.chat_completion import ChatMessage

from aimodels.providers.mistral_interface import MistralInterface
from aisuite.providers.mistral_interface import MistralInterface


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_ollama_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from unittest.mock import patch, MagicMock
from aimodels.providers.ollama_interface import OllamaInterface
from aisuite.providers.ollama_interface import OllamaInterface
from httpx import ConnectError


Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_openai_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from unittest.mock import patch, MagicMock
from aimodels.providers.openai_interface import OpenAIInterface
from aisuite.providers.openai_interface import OpenAIInterface


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_replicate_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from unittest.mock import patch, MagicMock
from aimodels.providers.replicate_interface import ReplicateInterface
from aisuite.providers.replicate_interface import ReplicateInterface


@pytest.fixture(autouse=True)
Expand Down

0 comments on commit 97ec95b

Please sign in to comment.