Skip to content

Commit 685b416

Browse files
committed
[Fix] remove bearer from api key.
1 parent a94f448 commit 685b416

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

edenai_apis/apis/tenstorrent/tenstorrent_api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from edenai_apis.loaders.loaders import load_provider
88
from openai import OpenAI
99

10+
1011
class TenstorrentApi(
1112
ProviderInterface,
1213
TenstorrentTextApi,
@@ -21,13 +22,11 @@ def __init__(self, api_keys: Dict = {}):
2122
self.api_key = self.api_settings["api_key"]
2223
self.headers = {
2324
"accept": "application/json",
24-
"authorization": self.api_key,
25+
"authorization": f"Bearer {self.api_key}",
2526
"content-type": "application/json",
2627
"Tenstorrent-Version": "2023-06-26",
2728
}
2829
self.chatgen_base_url = "https://chat-and-generation--eden-ai.workload.tenstorrent.com"
2930
self.chatgen_api_version = "v1"
3031
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)

0 commit comments

Comments
 (0)