Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions edsl/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class InferenceServiceType(EnumWithChecks):
MISTRAL = "mistral"
TOGETHER = "together"
PERPLEXITY = "perplexity"
DEEPSEEK = "deepseek"


# unavoidable violation of the DRY principle but it is necessary
Expand All @@ -84,6 +85,7 @@ class InferenceServiceType(EnumWithChecks):
"mistral",
"together",
"perplexity",
"deepseek",
]

available_models_urls = {
Expand All @@ -107,6 +109,7 @@ class InferenceServiceType(EnumWithChecks):
InferenceServiceType.MISTRAL.value: "MISTRAL_API_KEY",
InferenceServiceType.TOGETHER.value: "TOGETHER_API_KEY",
InferenceServiceType.PERPLEXITY.value: "PERPLEXITY_API_KEY",
InferenceServiceType.DEEPSEEK.value: "DEEPSEEK_API_KEY",
}


Expand Down
18 changes: 18 additions & 0 deletions edsl/inference_services/DeepSeekService.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import aiohttp
import json
import requests
from typing import Any, List

# from edsl.inference_services.InferenceServiceABC import InferenceServiceABC
from edsl.language_models import LanguageModel

from edsl.inference_services.OpenAIService import OpenAIService


class DeepSeekService(OpenAIService):
"""DeepInfra service class."""

_inference_service_ = "deepseek"
_env_key_name_ = "DEEPSEEK_API_KEY"
_base_url_ = "https://api.deepseek.com"
_models_list_cache: List[str] = []
2 changes: 2 additions & 0 deletions edsl/inference_services/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from edsl.inference_services.TestService import TestService
from edsl.inference_services.TogetherAIService import TogetherAIService
from edsl.inference_services.PerplexityService import PerplexityService
from edsl.inference_services.DeepSeekService import DeepSeekService

try:
from edsl.inference_services.MistralAIService import MistralAIService
Expand All @@ -33,6 +34,7 @@
TestService,
TogetherAIService,
PerplexityService,
DeepSeekService,
]

if mistral_available:
Expand Down
Loading