Skip to content

Commit

Permalink
chore: Fix package name conflict error (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyinc authored Jan 22, 2024
1 parent 1484981 commit 73c86ff
Show file tree
Hide file tree
Showing 48 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion dbgpt/app/scene/base_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dbgpt._private.config import Config
from dbgpt._private.pydantic import Extra
from dbgpt.app.scene.base import AppScenePromptTemplateAdapter, ChatScene
from dbgpt.app.scene.operator.app_operator import (
from dbgpt.app.scene.operators.app_operator import (
AppChatComposerOperator,
ChatComposerInput,
build_cached_chat_operator,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
MapOperator,
SimpleCallDataInputSource,
)
from dbgpt.core.operator import (
from dbgpt.core.operators import (
BufferedConversationMapperOperator,
HistoryPromptBuilderOperator,
LLMBranchOperator,
)
from dbgpt.model.operator import LLMOperator, StreamingLLMOperator
from dbgpt.model.operators import LLMOperator, StreamingLLMOperator
from dbgpt.storage.cache.operator import (
CachedModelOperator,
CachedModelStreamOperator,
Expand Down
8 changes: 4 additions & 4 deletions dbgpt/core/awel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from dbgpt.component import SystemApp

from .dag.base import DAG, DAGContext
from .operator.base import BaseOperator, WorkflowRunner
from .operator.common_operator import (
from .operators.base import BaseOperator, WorkflowRunner
from .operators.common_operator import (
BranchFunc,
BranchOperator,
InputOperator,
Expand All @@ -24,7 +24,7 @@
ReduceStreamOperator,
TriggerOperator,
)
from .operator.stream_operator import (
from .operators.stream_operator import (
StreamifyAbsOperator,
TransformStreamAbsOperator,
UnstreamifyAbsOperator,
Expand Down Expand Up @@ -82,7 +82,7 @@ def initialize_awel(system_app: SystemApp, dag_dirs: List[str]):
"""Initialize AWEL."""
from .dag.base import DAGVar
from .dag.dag_manager import DAGManager
from .operator.base import initialize_runner
from .operators.base import initialize_runner
from .trigger.trigger_manager import DefaultTriggerManager

DAGVar.set_current_system_app(system_app)
Expand Down
2 changes: 1 addition & 1 deletion dbgpt/core/awel/dag/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def dag_id(self) -> str:
return self._dag_id

def _build(self) -> None:
from ..operator.common_operator import TriggerOperator
from ..operators.common_operator import TriggerOperator

nodes: Set[DAGNode] = set()
for _, node in self.node_map.items():
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dbgpt/core/awel/runner/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Dict, List, Optional, cast

from ..dag.base import DAGLifecycle
from ..operator.base import CALL_DATA, BaseOperator
from ..operators.base import CALL_DATA, BaseOperator

logger = logging.getLogger(__name__)

Expand Down
6 changes: 3 additions & 3 deletions dbgpt/core/awel/runner/local_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from dbgpt.component import SystemApp

from ..dag.base import DAGContext, DAGVar
from ..operator.base import CALL_DATA, BaseOperator, WorkflowRunner
from ..operator.common_operator import BranchOperator, JoinOperator
from ..operators.base import CALL_DATA, BaseOperator, WorkflowRunner
from ..operators.common_operator import BranchOperator, JoinOperator
from ..task.base import SKIP_DATA, TaskContext, TaskState
from ..task.task_impl import DefaultInputContext, DefaultTaskContext, SimpleTaskOutput
from .job_manager import JobManager
Expand Down Expand Up @@ -80,7 +80,7 @@ async def _execute_node(
if node.node_id in node_outputs:
return

# Run all upstream node
# Run all upstream nodes
for upstream_node in node.upstream:
if isinstance(upstream_node, BaseOperator):
await self._execute_node(
Expand Down
2 changes: 1 addition & 1 deletion dbgpt/core/awel/trigger/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from abc import ABC, abstractmethod

from ..operator.common_operator import TriggerOperator
from ..operators.common_operator import TriggerOperator


class Trigger(TriggerOperator, ABC):
Expand Down
2 changes: 1 addition & 1 deletion dbgpt/core/awel/trigger/http_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dbgpt._private.pydantic import BaseModel

from ..dag.base import DAG
from ..operator.base import BaseOperator
from ..operators.base import BaseOperator
from .base import Trigger

if TYPE_CHECKING:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
MapOperator,
SimpleCallDataInputSource,
)
from dbgpt.core.interface.operator.prompt_operator import HistoryPromptBuilderOperator
from dbgpt.core.interface.operators.prompt_operator import HistoryPromptBuilderOperator

from .message_operator import (
BufferedConversationMapperOperator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class BufferedConversationMapperOperator(ConversationMapperOperator):
# Keeping the first 2 and the last 1 rounds of a conversation
import asyncio
from dbgpt.core.interface.message import AIMessage, HumanMessage
from dbgpt.core.operator import BufferedConversationMapperOperator
from dbgpt.core.operators import BufferedConversationMapperOperator
operator = BufferedConversationMapperOperator(
keep_start_rounds=2, keep_end_rounds=1
Expand Down Expand Up @@ -338,7 +338,7 @@ def _filter_round_messages(
Examples:
>>> from dbgpt.core import AIMessage, HumanMessage
>>> from dbgpt.core.operator import BufferedConversationMapperOperator
>>> from dbgpt.core.operators import BufferedConversationMapperOperator
>>> messages = [
... [
... HumanMessage(content="Hi", round_index=1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
)
from dbgpt.core.awel import JoinOperator, MapOperator
from dbgpt.core.interface.message import BaseMessage
from dbgpt.core.interface.operator.llm_operator import BaseLLM
from dbgpt.core.interface.operator.message_operator import BaseConversationOperator
from dbgpt.core.interface.operators.llm_operator import BaseLLM
from dbgpt.core.interface.operators.message_operator import BaseConversationOperator
from dbgpt.core.interface.prompt import (
BaseChatPromptTemplate,
HumanPromptTemplate,
Expand Down Expand Up @@ -115,7 +115,7 @@ class PromptBuilderOperator(
SystemPromptTemplate,
ChatPromptTemplate,
)
from dbgpt.core.operator import PromptBuilderOperator
from dbgpt.core.operators import PromptBuilderOperator
with DAG("prompt_test") as dag:
str_prompt = PromptBuilderOperator(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
"""All core operators."""

from dbgpt.core.interface.operator.composer_operator import ( # noqa: F401
from dbgpt.core.interface.operators.composer_operator import ( # noqa: F401
ChatComposerInput,
ChatHistoryPromptComposerOperator,
)
from dbgpt.core.interface.operator.llm_operator import ( # noqa: F401
from dbgpt.core.interface.operators.llm_operator import ( # noqa: F401
BaseLLM,
BaseLLMOperator,
BaseStreamingLLMOperator,
LLMBranchOperator,
RequestBuilderOperator,
)
from dbgpt.core.interface.operator.message_operator import ( # noqa: F401
from dbgpt.core.interface.operators.message_operator import ( # noqa: F401
BaseConversationOperator,
BufferedConversationMapperOperator,
ConversationMapperOperator,
PreChatHistoryLoadOperator,
TokenBufferedConversationMapperOperator,
)
from dbgpt.core.interface.operator.prompt_operator import ( # noqa: F401
from dbgpt.core.interface.operators.prompt_operator import ( # noqa: F401
DynamicPromptBuilderOperator,
HistoryDynamicPromptBuilderOperator,
HistoryPromptBuilderOperator,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dbgpt.model.operator.llm_operator import ( # noqa: F401
from dbgpt.model.operators.llm_operator import ( # noqa: F401
LLMOperator,
MixinLLMOperator,
StreamingLLMOperator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dbgpt.component import ComponentType
from dbgpt.core import LLMClient
from dbgpt.core.awel import BaseOperator
from dbgpt.core.operator import BaseLLM, BaseLLMOperator, BaseStreamingLLMOperator
from dbgpt.core.operators import BaseLLM, BaseLLMOperator, BaseStreamingLLMOperator

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion dbgpt/model/utils/chatgpt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from dbgpt._private.pydantic import model_to_json
from dbgpt.core.awel import TransformStreamAbsOperator
from dbgpt.core.interface.llm import ModelOutput
from dbgpt.core.operator import BaseLLM
from dbgpt.core.operators import BaseLLM

if TYPE_CHECKING:
import httpx
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any

from dbgpt.core.interface.operator.retriever import RetrieverOperator
from dbgpt.core.interface.operators.retriever import RetrieverOperator
from dbgpt.datasource.rdbms.base import RDBMSDatabase
from dbgpt.rag.summary.rdbms_db_summary import _parse_db_summary

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, Optional

from dbgpt.core.awel.task.base import IN
from dbgpt.core.interface.operator.retriever import RetrieverOperator
from dbgpt.core.interface.operators.retriever import RetrieverOperator
from dbgpt.datasource.rdbms.base import RDBMSDatabase
from dbgpt.rag.retriever.db_schema import DBSchemaRetriever
from dbgpt.storage.vector_store.connector import VectorStoreConnector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any, Optional

from dbgpt.core.awel.task.base import IN
from dbgpt.core.interface.operator.retriever import RetrieverOperator
from dbgpt.core.interface.operators.retriever import RetrieverOperator
from dbgpt.rag.retriever.embedding import EmbeddingRetriever
from dbgpt.rag.retriever.rerank import Ranker
from dbgpt.rag.retriever.rewrite import QueryRewrite
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dbgpt/serve/conversation/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
StorageConversation,
StorageInterface,
)
from dbgpt.core.operator import PreChatHistoryLoadOperator
from dbgpt.core.operators import PreChatHistoryLoadOperator

from .serve import Serve

Expand Down
4 changes: 2 additions & 2 deletions examples/awel/data_analyst_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
SystemPromptTemplate,
)
from dbgpt.core.awel import DAG, HttpTrigger, JoinOperator, MapOperator
from dbgpt.core.operator import (
from dbgpt.core.operators import (
BufferedConversationMapperOperator,
HistoryDynamicPromptBuilderOperator,
LLMBranchOperator,
RequestBuilderOperator,
)
from dbgpt.model.operator import (
from dbgpt.model.operators import (
LLMOperator,
OpenAIStreamingOutputOperator,
StreamingLLMOperator,
Expand Down
2 changes: 1 addition & 1 deletion examples/awel/simple_chat_dag_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from dbgpt._private.pydantic import BaseModel, Field
from dbgpt.core import ModelMessage, ModelRequest
from dbgpt.core.awel import DAG, HttpTrigger, MapOperator
from dbgpt.model.operator import LLMOperator
from dbgpt.model.operators import LLMOperator


class TriggerReqBody(BaseModel):
Expand Down
4 changes: 2 additions & 2 deletions examples/awel/simple_chat_history_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
SystemPromptTemplate,
)
from dbgpt.core.awel import DAG, HttpTrigger, JoinOperator, MapOperator
from dbgpt.core.operator import (
from dbgpt.core.operators import (
ChatComposerInput,
ChatHistoryPromptComposerOperator,
LLMBranchOperator,
)
from dbgpt.model.operator import (
from dbgpt.model.operators import (
LLMOperator,
OpenAIStreamingOutputOperator,
StreamingLLMOperator,
Expand Down
2 changes: 1 addition & 1 deletion examples/awel/simple_dbschema_retriever_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dbgpt.datasource.rdbms.conn_sqlite import SQLiteTempConnect
from dbgpt.rag.chunk import Chunk
from dbgpt.rag.embedding.embedding_factory import DefaultEmbeddingFactory
from dbgpt.rag.operator.db_schema import DBSchemaRetrieverOperator
from dbgpt.rag.operators.db_schema import DBSchemaRetrieverOperator
from dbgpt.serve.rag.operators.db_schema import DBSchemaAssemblerOperator
from dbgpt.storage.vector_store.chroma_store import ChromaVectorConfig
from dbgpt.storage.vector_store.connector import VectorStoreConnector
Expand Down
4 changes: 2 additions & 2 deletions examples/awel/simple_llm_client_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
from dbgpt._private.pydantic import BaseModel, Field
from dbgpt.core import LLMClient
from dbgpt.core.awel import DAG, HttpTrigger, JoinOperator, MapOperator
from dbgpt.core.operator import LLMBranchOperator, RequestBuilderOperator
from dbgpt.model.operator import (
from dbgpt.core.operators import LLMBranchOperator, RequestBuilderOperator
from dbgpt.model.operators import (
LLMOperator,
MixinLLMOperator,
OpenAIStreamingOutputOperator,
Expand Down
4 changes: 2 additions & 2 deletions examples/awel/simple_nl_schema_sql_chart_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from dbgpt.core.awel import DAG, HttpTrigger, JoinOperator, MapOperator
from dbgpt.datasource.rdbms.base import RDBMSDatabase
from dbgpt.datasource.rdbms.conn_sqlite import SQLiteTempConnect
from dbgpt.model import OpenAILLMClient
from dbgpt.model.proxy import OpenAILLMClient
from dbgpt.rag.embedding.embedding_factory import DefaultEmbeddingFactory
from dbgpt.rag.operator.schema_linking import SchemaLinkingOperator
from dbgpt.rag.operators.schema_linking import SchemaLinkingOperator
from dbgpt.storage.vector_store.chroma_store import ChromaVectorConfig
from dbgpt.storage.vector_store.connector import VectorStoreConnector
from dbgpt.util.chat_util import run_async_tasks
Expand Down
2 changes: 1 addition & 1 deletion examples/awel/simple_rag_embedding_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from dbgpt.core.awel import DAG, HttpTrigger, MapOperator
from dbgpt.rag.embedding.embedding_factory import DefaultEmbeddingFactory
from dbgpt.rag.knowledge.base import KnowledgeType
from dbgpt.rag.operator.knowledge import KnowledgeOperator
from dbgpt.rag.operators.knowledge import KnowledgeOperator
from dbgpt.serve.rag.operators.embedding import EmbeddingAssemblerOperator
from dbgpt.storage.vector_store.chroma_store import ChromaVectorConfig
from dbgpt.storage.vector_store.connector import VectorStoreConnector
Expand Down
6 changes: 3 additions & 3 deletions examples/awel/simple_rag_retriever_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from dbgpt.model.proxy import OpenAILLMClient
from dbgpt.rag.chunk import Chunk
from dbgpt.rag.embedding.embedding_factory import DefaultEmbeddingFactory
from dbgpt.rag.operator.embedding import EmbeddingRetrieverOperator
from dbgpt.rag.operator.rerank import RerankOperator
from dbgpt.rag.operator.rewrite import QueryRewriteOperator
from dbgpt.rag.operators.embedding import EmbeddingRetrieverOperator
from dbgpt.rag.operators.rerank import RerankOperator
from dbgpt.rag.operators.rewrite import QueryRewriteOperator
from dbgpt.storage.vector_store.chroma_store import ChromaVectorConfig
from dbgpt.storage.vector_store.connector import VectorStoreConnector

Expand Down
2 changes: 1 addition & 1 deletion examples/awel/simple_rag_rewrite_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from dbgpt._private.pydantic import BaseModel, Field
from dbgpt.core.awel import DAG, HttpTrigger, MapOperator
from dbgpt.model.proxy import OpenAILLMClient
from dbgpt.rag.operator.rewrite import QueryRewriteOperator
from dbgpt.rag.operators.rewrite import QueryRewriteOperator


class TriggerReqBody(BaseModel):
Expand Down
4 changes: 2 additions & 2 deletions examples/awel/simple_rag_summary_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
from dbgpt.core.awel import DAG, HttpTrigger, MapOperator
from dbgpt.model.proxy import OpenAILLMClient
from dbgpt.rag.knowledge.base import KnowledgeType
from dbgpt.rag.operator.knowledge import KnowledgeOperator
from dbgpt.rag.operator.summary import SummaryAssemblerOperator
from dbgpt.rag.operators.knowledge import KnowledgeOperator
from dbgpt.rag.operators.summary import SummaryAssemblerOperator


class TriggerReqBody(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion examples/sdk/simple_sdk_llm_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from dbgpt.core import BaseOutputParser
from dbgpt.core.awel import DAG
from dbgpt.core.operator import (
from dbgpt.core.operators import (
BaseLLMOperator,
PromptBuilderOperator,
RequestBuilderOperator,
Expand Down
6 changes: 3 additions & 3 deletions examples/sdk/simple_sdk_llm_sql_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
MapOperator,
SimpleCallDataInputSource,
)
from dbgpt.core.operator import (
from dbgpt.core.operators import (
BaseLLMOperator,
PromptBuilderOperator,
RequestBuilderOperator,
)
from dbgpt.datasource.operator.datasource_operator import DatasourceOperator
from dbgpt.datasource.operators.datasource_operator import DatasourceOperator
from dbgpt.datasource.rdbms.conn_sqlite import SQLiteTempConnect
from dbgpt.model.proxy import OpenAILLMClient
from dbgpt.rag.operator.datasource import DatasourceRetrieverOperator
from dbgpt.rag.operators.datasource import DatasourceRetrieverOperator


def _create_temporary_connection():
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ def init_install_requires():
"dbgpt.model",
"dbgpt.model.proxy",
"dbgpt.model.proxy.*",
"dbgpt.model.operator",
"dbgpt.model.operator.*",
"dbgpt.model.operators",
"dbgpt.model.operators.*",
"dbgpt.model.utils",
"dbgpt.model.utils.*",
],
Expand Down

0 comments on commit 73c86ff

Please sign in to comment.