File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
edenai_apis/apis/tenstorrent Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 7
7
from edenai_apis .loaders .loaders import load_provider
8
8
from openai import OpenAI
9
9
10
+
10
11
class TenstorrentApi (
11
12
ProviderInterface ,
12
13
TenstorrentTextApi ,
@@ -21,13 +22,11 @@ def __init__(self, api_keys: Dict = {}):
21
22
self .api_key = self .api_settings ["api_key" ]
22
23
self .headers = {
23
24
"accept" : "application/json" ,
24
- "authorization" : self .api_key ,
25
+ "authorization" : f"Bearer { self .api_key } " ,
25
26
"content-type" : "application/json" ,
26
27
"Tenstorrent-Version" : "2023-06-26" ,
27
28
}
28
29
self .chatgen_base_url = "https://chat-and-generation--eden-ai.workload.tenstorrent.com"
29
30
self .chatgen_api_version = "v1"
30
31
self .chatgen_url = f"{ self .chatgen_base_url } /{ self .chatgen_api_version } "
31
- self .client = OpenAI (
32
- api_key = self .api_key , base_url = self .chatgen_url
33
- )
32
+ self .client = OpenAI (api_key = self .api_key , base_url = self .chatgen_url )
You can’t perform that action at this time.
0 commit comments