Skip to content

Commit

Permalink
rename llm_client module
Browse files Browse the repository at this point in the history
  • Loading branch information
micpst committed May 16, 2024
1 parent 59e08ac commit fe82b9b
Show file tree
Hide file tree
Showing 25 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion benchmark/dbally_benchmark/e2e_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import dbally
from dbally.collection import Collection
from dbally.iql_generator.iql_prompt_template import default_iql_template
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient
from dbally.utils.errors import NoViewFoundError, UnsupportedQueryError
from dbally.view_selection.view_selector_prompt_template import default_view_selector_template

Expand Down
2 changes: 1 addition & 1 deletion benchmark/dbally_benchmark/iql_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from dbally.audit.event_tracker import EventTracker
from dbally.iql_generator.iql_generator import IQLGenerator
from dbally.iql_generator.iql_prompt_template import default_iql_template
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient
from dbally.utils.errors import UnsupportedQueryError
from dbally.views.structured import BaseStructuredView

Expand Down
4 changes: 2 additions & 2 deletions benchmark/dbally_benchmark/text2sql_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from sqlalchemy import create_engine

from dbally.audit.event_tracker import EventTracker
from dbally.llm_client.base import LLMClient
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.base import LLMClient
from dbally.llms.litellm import OpenAIClient


def _load_db_schema(db_name: str, encoding: Optional[str] = None) -> str:
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/custom_views_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from dbally.audit.event_handlers.cli_event_handler import CLIEventHandler
from dbally.iql import IQLQuery, syntax
from dbally.data_models.execution_result import ViewExecutionResult
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient

@dataclass
class Candidate:
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/pandas_views_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from dbally import decorators, DataFrameBaseView
from dbally.audit.event_handlers.cli_event_handler import CLIEventHandler
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient


class CandidateView(DataFrameBaseView):
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart/quickstart2_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from dbally.audit.event_handlers.cli_event_handler import CLIEventHandler
from dbally.similarity import SimpleSqlAlchemyFetcher, FaissStore, SimilarityIndex
from dbally.embedding_client.openai import OpenAiEmbeddingClient
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient

engine = create_engine('sqlite:///candidates.db')

Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart/quickstart3_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from dbally import decorators, SqlAlchemyBaseView, DataFrameBaseView, ExecutionResult
from dbally.similarity import SimpleSqlAlchemyFetcher, FaissStore, SimilarityIndex
from dbally.embedding_client.openai import OpenAiEmbeddingClient
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient

engine = create_engine('sqlite:///candidates.db')

Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart/quickstart_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from dbally import decorators, SqlAlchemyBaseView
from dbally.audit.event_handlers.cli_event_handler import CLIEventHandler
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient


engine = create_engine('sqlite:///candidates.db')
Expand Down
2 changes: 1 addition & 1 deletion examples/recruiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import dbally
from dbally.audit.event_handlers.cli_event_handler import CLIEventHandler
from dbally.audit.event_tracker import EventTracker
from dbally.llm_client.openai_client import OpenAIClient
from dbally.llms.litellm import OpenAIClient
from dbally.prompts import PromptTemplate

TEXT2SQL_PROMPT_TEMPLATE = PromptTemplate(
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .audit.event_handlers.base import EventHandler
from .collection import Collection
from .llm_client.base import LLMClient
from .llms.base import LLMClient
from .nl_responder.nl_responder import NLResponder
from .view_selection.base import ViewSelector
from .view_selection.llm_view_selector import LLMViewSelector
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dbally.audit.event_tracker import EventTracker
from dbally.data_models.audit import RequestEnd, RequestStart
from dbally.data_models.execution_result import ExecutionResult
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions
from dbally.nl_responder.nl_responder import NLResponder
from dbally.similarity.index import AbstractSimilarityIndex
from dbally.utils.errors import NoViewFoundError
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/iql_generator/iql_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from dbally.audit.event_tracker import EventTracker
from dbally.iql_generator.iql_prompt_template import IQLPromptTemplate, default_iql_template
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions
from dbally.views.exposed_functions import ExposedFunction


Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from openai import NotGiven as OpenAINotGiven

from dbally.data_models.audit import LLMEvent
from dbally.llm_client.base import LLMClient
from dbally.llms.base import LLMClient
from dbally.prompts import ChatFormat

from .._types import NOT_GIVEN, NotGiven
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/nl_responder/nl_responder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from dbally.audit.event_tracker import EventTracker
from dbally.data_models.execution_result import ViewExecutionResult
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions
from dbally.nl_responder.nl_responder_prompt_template import NLResponderPromptTemplate, default_nl_responder_template
from dbally.nl_responder.query_explainer_prompt_template import (
QueryExplainerPromptTemplate,
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/view_selection/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Dict, Optional

from dbally.audit.event_tracker import EventTracker
from dbally.llm_client.base import LLMOptions
from dbally.llms.base import LLMOptions


class ViewSelector(abc.ABC):
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/view_selection/llm_view_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from dbally.audit.event_tracker import EventTracker
from dbally.iql_generator.iql_prompt_template import IQLPromptTemplate
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions
from dbally.view_selection.base import ViewSelector
from dbally.view_selection.view_selector_prompt_template import default_view_selector_template

Expand Down
2 changes: 1 addition & 1 deletion src/dbally/view_selection/random_view_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Dict, Optional

from dbally.audit.event_tracker import EventTracker
from dbally.llm_client.base import LLMOptions
from dbally.llms.base import LLMOptions
from dbally.view_selection.base import ViewSelector


Expand Down
2 changes: 1 addition & 1 deletion src/dbally/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from dbally.audit.event_tracker import EventTracker
from dbally.data_models.execution_result import ViewExecutionResult
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions


class BaseView(metaclass=abc.ABCMeta):
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/views/freeform/text2sql/_autodiscovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from sqlalchemy.sql.ddl import CreateTable
from typing_extensions import Self

from dbally.llm_client.base import LLMClient
from dbally.llms.base import LLMClient
from dbally.prompts import PromptTemplate

from ._config import Text2SQLConfig, Text2SQLTableConfig
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/views/freeform/text2sql/_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from dbally.audit.event_tracker import EventTracker
from dbally.data_models.execution_result import ViewExecutionResult
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions
from dbally.prompts import PromptTemplate
from dbally.views.base import BaseView

Expand Down
2 changes: 1 addition & 1 deletion src/dbally/views/structured.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dbally.data_models.execution_result import ViewExecutionResult
from dbally.iql import IQLError, IQLQuery
from dbally.iql_generator.iql_generator import IQLGenerator
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions
from dbally.views.exposed_functions import ExposedFunction

from .base import BaseView
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from dbally.iql import IQLQuery
from dbally.iql_generator.iql_generator import IQLGenerator
from dbally.iql_generator.iql_prompt_template import IQLPromptTemplate, default_iql_template
from dbally.llm_client.base import LLMClient, LLMOptions
from dbally.llms.base import LLMClient, LLMOptions
from dbally.similarity.index import AbstractSimilarityIndex
from dbally.view_selection.base import ViewSelector
from dbally.views.structured import BaseStructuredView, ExposedFunction, ViewExecutionResult
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_view_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import dbally
from dbally.audit.event_tracker import EventTracker
from dbally.llm_client.base import LLMClient
from dbally.llms.base import LLMClient
from dbally.view_selection.llm_view_selector import LLMViewSelector

from .mocks import MockLLMClient
Expand Down

0 comments on commit fe82b9b

Please sign in to comment.