Skip to content

Commit

Permalink
update ordering of llms to alphabetical
Browse files Browse the repository at this point in the history
  • Loading branch information
ksolo committed Jul 10, 2024
1 parent 1be2a6c commit 3bdd7fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ANTHROPIC_API_KEY=""
FIREWORKS_API_KEY=""
GROQ_API_KEY=""
MISTRAL_API_KEY=""
OPENAI_API_KEY=""
OLLAMA_API_URL="http://localhost:11434"
REPLICATE_API_KEY=""
4 changes: 2 additions & 2 deletions aimodels/client/multi_fm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from .chat import Chat
from ..providers import (
AnthropicInterface,
FireworksInterface,
GroqInterface,
MistralInterface,
OllamaInterface,
OpenAIInterface,
FireworksInterface,
ReplicateInterface,
)

Expand Down Expand Up @@ -36,11 +36,11 @@ def __init__(self):
self.all_interfaces = {}
self.all_factories = {
"anthropic": AnthropicInterface,
"fireworks": FireworksInterface,
"groq": GroqInterface,
"mistral": MistralInterface,
"ollama": OllamaInterface,
"openai": OpenAIInterface,
"fireworks": FireworksInterface,
"replicate": ReplicateInterface,
}

Expand Down
2 changes: 1 addition & 1 deletion aimodels/providers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Provides the individual provider interfaces for each FM provider."""

from .anthropic_interface import AnthropicInterface
from .fireworks_interface import FireworksInterface
from .groq_interface import GroqInterface
from .mistral_interface import MistralInterface
from .ollama_interface import OllamaInterface
from .openai_interface import OpenAIInterface
from .fireworks_interface import FireworksInterface
from .replicate_interface import ReplicateInterface
4 changes: 3 additions & 1 deletion aimodels/providers/replicate_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from ..framework.provider_interface import ProviderInterface

_REPLICATE_BASE_URL = "https://openai-proxy.replicate.com/v1"


class ReplicateInterface(ProviderInterface):
"""Implements the ProviderInterface for interacting with Replicate's APIs."""
Expand All @@ -14,7 +16,7 @@ def __init__(self):

self.replicate_client = OpenAI(
api_key=os.getenv("REPLICATE_API_KEY"),
base_url="https://openai-proxy.replicate.com/v1",
base_url=_REPLICATE_BASE_URL,
)

def chat_completion_create(self, messages=None, model=None, temperature=0):
Expand Down

0 comments on commit 3bdd7fe

Please sign in to comment.