Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies = [
"asyncpg",
"awscli-local",
"boto3",
"chainlit ~= 2.9.3",
"chainlit ~= 2.9.5",
"lancedb",
"langchain_aws",
"langchain_core >= 1.2.5",
Expand Down
22 changes: 1 addition & 21 deletions willa/web/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,6 @@
]


async def get_step(self: ChainlitDataLayer, step_id: str) -> Optional[StepDict]:
"""Get step and related feedback"""
query = """
SELECT s.*,
f.id feedback_id,
f.value feedback_value,
f."comment" feedback_comment
FROM "Step" s LEFT JOIN "Feedback" f ON s.id = f."stepId"
WHERE s.id = $1
"""
result = await self.execute_query(query, {"step_id": step_id})
if not result:
return None
return self._convert_step_row_to_dict(result[0]) # pylint: disable="protected-access"


@cl.on_chat_start
async def ocs() -> None:
"""loaded when new chat is started"""
Expand Down Expand Up @@ -106,11 +90,7 @@ def _secret() -> str:
database_url = os.environ.get(
'DATABASE_URL', f"postgresql://{_pg('USER')}:{_secret()}@{_pg('HOST')}/{_pg('DB')}"
)
dl = ChainlitDataLayer(database_url=database_url)
# pylint: disable="no-value-for-parameter"
dl.get_step = get_step.__get__(dl) # type: ignore[attr-defined]
# pylint: enable="no-value-for-parameter"
return dl
return ChainlitDataLayer(database_url=database_url)


def _get_history() -> str:
Expand Down