Skip to content

Commit 1cdb60f

Browse files
authored
Rename portus to databao (#62)
* Dynamic package version from the git tag * Rename `portus` to `databao` * Capitalize Databao in the README
1 parent e8b03b7 commit 1cdb60f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+188
-176
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Portus: NL queries for data
1+
# Databao: NL queries for data
22

33
## Setup connection
44

@@ -10,11 +10,11 @@ engine = create_engine(
1010
)
1111
```
1212

13-
## Create portus session
13+
## Create a databao session
1414

1515
```python
1616
llm_config = LLMConfig(name="gpt-4o-mini", temperature=0)
17-
session = portus.open_session(llm_config=llm_config)
17+
session = databao.open_session(llm_config=llm_config)
1818
session.add_db(engine)
1919
```
2020

@@ -28,7 +28,7 @@ thread.ask("list all german shows").df()
2828

2929
## Local models
3030

31-
Portus can be used with local LLMs either using ollama or OpenAI API compatible servers (LM Studio, llama.cpp, etc.).
31+
Databao can be used with local LLMs either using ollama or OpenAI API compatible servers (LM Studio, llama.cpp, etc.).
3232

3333
### Ollama
3434

databao/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from databao.api import open_session
2+
from databao.configs.llm import LLMConfig
3+
from databao.core import ExecutionResult, Executor, Opa, Pipe, Session, VisualisationResult, Visualizer
4+
5+
__all__ = [
6+
"ExecutionResult",
7+
"Executor",
8+
"LLMConfig",
9+
"Opa",
10+
"Pipe",
11+
"Session",
12+
"VisualisationResult",
13+
"Visualizer",
14+
"open_session",
15+
]

databao/agents/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from databao.agents.lighthouse.agent import LighthouseAgent
2+
from databao.agents.react_duckdb.agent import ReactDuckDBAgent
3+
4+
__all__ = ["LighthouseAgent", "ReactDuckDBAgent"]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from langchain_core.runnables import RunnableConfig
88
from langgraph.graph.state import CompiledStateGraph
99

10-
from portus.agents.frontend.text_frontend import TextStreamFrontend
11-
from portus.configs.llm import LLMConfig
12-
from portus.core import Executor, Opa, Session
10+
from databao.agents.frontend.text_frontend import TextStreamFrontend
11+
from databao.configs.llm import LLMConfig
12+
from databao.core import Executor, Opa, Session
1313

1414
try:
1515
from duckdb import DuckDBPyConnection
@@ -44,7 +44,7 @@ def _get_data_connection(self, session: Session) -> Any:
4444
if not duckdb_connections:
4545
raise RuntimeError(
4646
"No DuckDB connection found. LighthouseAgent requires a DuckDB connection. "
47-
"Use portus.duckdb.register_sqlalchemy() or similar to attach external databases to DuckDB."
47+
"Use databao.duckdb.register_sqlalchemy() or similar to attach external databases to DuckDB."
4848
)
4949

5050
# Use the first DuckDB connection
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pandas as pd
55
from langchain_core.messages import AIMessage, AIMessageChunk, BaseMessage, BaseMessageChunk, ToolMessage
66

7-
from portus.agents.frontend.messages import get_reasoning_content, get_tool_call_sql
7+
from databao.agents.frontend.messages import get_reasoning_content, get_tool_call_sql
88

99

1010
class TextStreamFrontend:
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
from langchain_core.messages import SystemMessage
55
from langchain_core.runnables import RunnableConfig
66

7-
from portus.agents.base import AgentExecutor
8-
from portus.agents.lighthouse.graph import ExecuteSubmit
9-
from portus.agents.lighthouse.utils import get_today_date_str, read_prompt_template
10-
from portus.configs.llm import LLMConfig
11-
from portus.core import ExecutionResult, Opa, Session
12-
from portus.duckdb.utils import describe_duckdb_schema
7+
from databao.agents.base import AgentExecutor
8+
from databao.agents.lighthouse.graph import ExecuteSubmit
9+
from databao.agents.lighthouse.utils import get_today_date_str, read_prompt_template
10+
from databao.configs.llm import LLMConfig
11+
from databao.core import ExecutionResult, Opa, Session
12+
from databao.duckdb.utils import describe_duckdb_schema
1313

1414

1515
class LighthouseAgent(AgentExecutor):
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
from langgraph.graph import add_messages
1313
from langgraph.graph.state import CompiledStateGraph, StateGraph
1414

15-
from portus.agents.lighthouse.utils import exception_to_string
16-
from portus.configs.llm import LLMConfig
17-
from portus.core import ExecutionResult
15+
from databao.agents.lighthouse.utils import exception_to_string
16+
from databao.configs.llm import LLMConfig
17+
from databao.core import ExecutionResult
1818

1919

2020
class AgentState(TypedDict):

0 commit comments

Comments
 (0)