Skip to content

Commit 60c358a

Browse files
Docs and outputs
1 parent 64823c1 commit 60c358a

38 files changed

+575
-49
lines changed

edenai_apis/apis/amazon/amazon_llm_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
ChatMessageDataClass,
1111
)
1212
from edenai_apis.utils.types import ResponseType
13-
from edenai_apis.features.llm.standard_chat_interface import StandardChatInterface
13+
from features.llm.llm_interface import LlmInterface
1414
from edenai_apis.llmengine.llm_engine import StdLLMEngine
1515
from edenai_apis.loaders.data_loader import ProviderDataEnum
1616
from edenai_apis.loaders.loaders import load_provider
1717
from edenai_apis.features.llm.chat.chat_dataclass import ChatCompletionResponse
1818

1919

20-
class AmazonLLMApi(StandardChatInterface):
20+
class AmazonLLMApi(LlmInterface):
2121

2222
def __init__(self, api_keys: Dict = {}) -> None:
2323
self.api_settings = load_provider(

edenai_apis/apis/amazon/info.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,11 @@
845845
"version": "boto3 (v1.29.6)"
846846
}
847847
},
848+
"llm": {
849+
"chat": {
850+
"version": "llmengine (v2)"
851+
}
852+
},
848853
"_metadata": {
849854
"privacy_url": "https://aws.amazon.com/privacy"
850855
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"id": "chatcmpl-B71qqu4Y7m1ZVuF5YGqxz7LXzgf0Y",
3+
"created": 1741015112,
4+
"model": "gpt-4o-mini-2024-07-18",
5+
"object": "chat.completion",
6+
"system_fingerprint": "fp_7fcd609668",
7+
"choices": [
8+
{
9+
"finish_reason": "stop",
10+
"index": 0,
11+
"message": {
12+
"content": "Arrr, matey! What ye be seein’ in this here image is a grand pathway, made of wooden planks, weavin' its way through a lush and green landscape. The verdant grass sways in the gentle breeze, and the sky above be a brilliant blue, decorated with fluffy white clouds. Ye can spot trees and bushes on either side, makin' it a perfect setting for a stroll amongst nature. A peaceful place for a pirate at heart, aye!",
13+
"role": "assistant",
14+
"tool_calls": null,
15+
"function_call": null
16+
}
17+
}
18+
],
19+
"provider_time": 3692885792,
20+
"edenai_time": null,
21+
"usage": {
22+
"completion_tokens": 99,
23+
"prompt_tokens": 1170,
24+
"total_tokens": 1269,
25+
"completion_tokens_details": {
26+
"accepted_prediction_tokens": 0,
27+
"audio_tokens": 0,
28+
"reasoning_tokens": 0,
29+
"rejected_prediction_tokens": 0,
30+
"text_tokens": 99
31+
},
32+
"prompt_tokens_details": {
33+
"audio_tokens": 0,
34+
"cached_tokens": 1024,
35+
"text_tokens": null,
36+
"image_tokens": null
37+
}
38+
},
39+
"service_tier": "default",
40+
"cost": 0.0002349
41+
}

edenai_apis/apis/anthropic/anthropic_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
from edenai_apis.loaders.data_loader import ProviderDataEnum
2323
from edenai_apis.loaders.loaders import load_provider
2424
from edenai_apis.utils.types import ResponseType
25-
from edenai_apis.features.llm.standard_chat_interface import StandardChatInterface
25+
from features.llm.llm_interface import LlmInterface
2626
from edenai_apis.features.llm.chat.chat_dataclass import ChatCompletionResponse
2727

2828

29-
class AnthropicApi(ProviderInterface, TextInterface, ImageInterface, StandardChatInterface):
29+
class AnthropicApi(ProviderInterface, TextInterface, ImageInterface, LlmInterface):
3030
provider_name = "anthropic"
3131

3232
def __init__(self, api_keys: Dict = {}) -> None:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"id": "chatcmpl-B71qqu4Y7m1ZVuF5YGqxz7LXzgf0Y",
3+
"created": 1741015112,
4+
"model": "gpt-4o-mini-2024-07-18",
5+
"object": "chat.completion",
6+
"system_fingerprint": "fp_7fcd609668",
7+
"choices": [
8+
{
9+
"finish_reason": "stop",
10+
"index": 0,
11+
"message": {
12+
"content": "Arrr, matey! What ye be seein’ in this here image is a grand pathway, made of wooden planks, weavin' its way through a lush and green landscape. The verdant grass sways in the gentle breeze, and the sky above be a brilliant blue, decorated with fluffy white clouds. Ye can spot trees and bushes on either side, makin' it a perfect setting for a stroll amongst nature. A peaceful place for a pirate at heart, aye!",
13+
"role": "assistant",
14+
"tool_calls": null,
15+
"function_call": null
16+
}
17+
}
18+
],
19+
"provider_time": 3692885792,
20+
"edenai_time": null,
21+
"usage": {
22+
"completion_tokens": 99,
23+
"prompt_tokens": 1170,
24+
"total_tokens": 1269,
25+
"completion_tokens_details": {
26+
"accepted_prediction_tokens": 0,
27+
"audio_tokens": 0,
28+
"reasoning_tokens": 0,
29+
"rejected_prediction_tokens": 0,
30+
"text_tokens": 99
31+
},
32+
"prompt_tokens_details": {
33+
"audio_tokens": 0,
34+
"cached_tokens": 1024,
35+
"text_tokens": null,
36+
"image_tokens": null
37+
}
38+
},
39+
"service_tier": "default",
40+
"cost": 0.0002349
41+
}

edenai_apis/apis/cohere/cohere_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
from edenai_apis.utils.exception import ProviderException
2929
from edenai_apis.utils.metrics import METRICS
3030
from edenai_apis.utils.types import ResponseType
31-
from edenai_apis.features.llm.standard_chat_interface import StandardChatInterface
31+
from features.llm.llm_interface import LlmInterface
3232
from edenai_apis.features.llm.chat.chat_dataclass import ChatCompletionResponse
3333

3434

35-
class CohereApi(ProviderInterface, TextInterface, StandardChatInterface):
35+
class CohereApi(ProviderInterface, TextInterface, LlmInterface):
3636
provider_name = "cohere"
3737

3838
def __init__(self, api_keys: Dict = {}):

edenai_apis/apis/cohere/info.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@
6767
"version": "2022-12-06"
6868
}
6969
},
70+
"llm": {
71+
"chat": {
72+
"version": "llmengine (v2)"
73+
}
74+
},
7075
"_metadata": {
7176
"privacy_url": "https://cohere.com/privacy"
7277
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"id": "chatcmpl-B71qqu4Y7m1ZVuF5YGqxz7LXzgf0Y",
3+
"created": 1741015112,
4+
"model": "gpt-4o-mini-2024-07-18",
5+
"object": "chat.completion",
6+
"system_fingerprint": "fp_7fcd609668",
7+
"choices": [
8+
{
9+
"finish_reason": "stop",
10+
"index": 0,
11+
"message": {
12+
"content": "Arrr, matey! What ye be seein’ in this here image is a grand pathway, made of wooden planks, weavin' its way through a lush and green landscape. The verdant grass sways in the gentle breeze, and the sky above be a brilliant blue, decorated with fluffy white clouds. Ye can spot trees and bushes on either side, makin' it a perfect setting for a stroll amongst nature. A peaceful place for a pirate at heart, aye!",
13+
"role": "assistant",
14+
"tool_calls": null,
15+
"function_call": null
16+
}
17+
}
18+
],
19+
"provider_time": 3692885792,
20+
"edenai_time": null,
21+
"usage": {
22+
"completion_tokens": 99,
23+
"prompt_tokens": 1170,
24+
"total_tokens": 1269,
25+
"completion_tokens_details": [
26+
[
27+
"accepted_prediction_tokens",
28+
0
29+
],
30+
[
31+
"audio_tokens",
32+
0
33+
],
34+
[
35+
"reasoning_tokens",
36+
0
37+
],
38+
[
39+
"rejected_prediction_tokens",
40+
0
41+
],
42+
[
43+
"text_tokens",
44+
null
45+
]
46+
],
47+
"prompt_tokens_details": [
48+
[
49+
"audio_tokens",
50+
0
51+
],
52+
[
53+
"cached_tokens",
54+
1024
55+
],
56+
[
57+
"text_tokens",
58+
null
59+
],
60+
[
61+
"image_tokens",
62+
null
63+
]
64+
]
65+
},
66+
"service_tier": "default",
67+
"cost": 0.0002349
68+
}

edenai_apis/apis/deepseek/deepseek_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
from edenai_apis.loaders.loaders import load_provider
1212
from edenai_apis.loaders.data_loader import ProviderDataEnum
1313
from edenai_apis.llmengine import LLMEngine
14-
from edenai_apis.features.llm.standard_chat_interface import StandardChatInterface
14+
from features.llm.llm_interface import LlmInterface
1515
from edenai_apis.llmengine.llm_engine import StdLLMEngine
1616
from edenai_apis.features.llm.chat.chat_dataclass import ChatCompletionResponse
1717

1818

19-
class DeepseekApi(ProviderInterface, TextInterface, StandardChatInterface):
19+
class DeepseekApi(ProviderInterface, TextInterface, LlmInterface):
2020
provider_name = "deepseek"
2121

2222
def __init__(self, api_keys: Dict = {}) -> None:

edenai_apis/apis/deepseek/info.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"version": "v1"
99
}
1010
},
11+
"llm": {
12+
"chat": {
13+
"version": "llmengine (v2)"
14+
}
15+
},
1116
"_metadata": {
1217
"privacy_url": "https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"
1318
}

0 commit comments

Comments
 (0)