Skip to content

Commit

Permalink
+ linting and type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lspinheiro committed Jan 9, 2025
1 parent 2ac3edf commit dff93ea
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from ._config import (
EmbeddingConfig,
GlobalContextConfig,
GlobalDataConfig,
LocalContextConfig,
Expand All @@ -23,5 +22,4 @@
"LocalSearchToolReturn",
"MapReduceConfig",
"SearchConfig",
"EmbeddingConfig",
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Callable, Literal, Optional

from pydantic import BaseModel


Expand Down Expand Up @@ -59,16 +57,3 @@ class SearchConfig(BaseModel):
max_tokens: int = 1500
temperature: float = 0.0
response_type: str = "multiple paragraphs"


class EmbeddingConfig(BaseModel):
api_key: Optional[str] = None
model: str
api_base: Optional[str] = None
deployment_name: Optional[str] = None
api_version: Optional[str] = None
api_type: Literal["azure", "openai"] = "openai"
organization: Optional[str] = None
azure_ad_token_provider: Optional[Callable[[], str]] = None
max_retries: int = 10
request_timeout: float = 180.0
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def agenerate(
) -> str:
return "Mock response"

async def astream_generate(
async def astream_generate( # type: ignore
self, messages: str | list[Any], callbacks: list[BaseLLMCallback] | None = None, **kwargs: Any
) -> AsyncGenerator[str, None]:
yield "Mock response"
Expand Down

0 comments on commit dff93ea

Please sign in to comment.