Skip to content

Commit cf59203

Browse files
Remove explicit types.
1 parent 0c65ac2 commit cf59203

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

singlestoredb/ai/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _inject_headers(request: Any, **_ignored: Any) -> None:
186186
# OpenAI / Azure OpenAI path
187187
openai_kwargs = dict(
188188
base_url=info.connection_url,
189-
# api_key='placeholder',
189+
api_key='placeholder',
190190
model=model_name,
191191
streaming=streaming,
192192
http_client=http_client,

singlestoredb/ai/utils.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
from collections.abc import Generator
2-
from typing import Callable
3-
from typing import Optional
4-
51
import httpx
62

73

84
class SingleStoreOpenAIAuth(httpx.Auth):
9-
def __init__(
10-
self,
11-
api_key_getter: Optional[Callable[[], Optional[str]]] = None,
12-
obo_token_getter: Optional[Callable[[], Optional[str]]] = None,
13-
):
5+
def __init__(self, api_key_getter, obo_token_getter): # type: ignore
146
self.api_key_getter = api_key_getter
157
self.obo_token_getter = obo_token_getter
168

17-
def auth_flow(
18-
self,
19-
request: httpx.Request,
20-
) -> Generator[httpx.Request, httpx.Response, None]:
9+
# def auth_flow(
10+
# self,
11+
# request: httpx.Request,
12+
# ) -> Generator[httpx.Request, httpx.Response, None]:
13+
14+
def auth_flow(self, request): # type: ignore[no-untyped-def]
2115
print(f'[DEBUG] auth_flow called for {request.method} {request.url}')
2216
if self.api_key_getter is not None:
2317
token_val = self.api_key_getter()

0 commit comments

Comments
 (0)