Skip to content

Commit

Permalink
Dependency updates (#37)
Browse files Browse the repository at this point in the history
* Upgrade dependency versions
* Langchain deprecation warning fixes
* Enable scroll to end when opening app
  • Loading branch information
villekr authored May 29, 2024
1 parent 5e8381d commit 66d782e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"textual==0.54",
"textual~=0.63",
"boto3~=1.34",
"loguru~=0.7",
"langchain~=0.1",
"langchain-core~=0.2",
"langchain-community~=0.2",
"langchain-openai~=0.1",
"langchain~=0.2",
"appdirs~=1.4",
"pydantic~=2.6",
"pydantic~=2.7",
"cache3~=0.4",
"aiofiles~=23.2",
"pyperclip~=1.8",
"eval-type-backport~=0.1",
"aiohttp~=3.9.3",
"ollama~=0.1.8",
"eval-type-backport~=0.2",
"ollama~=0.2",
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion src/paita/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024-present Ville Kärkkäinen <ville.karkkainen@outlook.com>
#
# SPDX-License-Identifier: MIT
__version__ = "0.1.10"
__version__ = "0.1.11"
2 changes: 1 addition & 1 deletion src/paita/ai/chat_history.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import TYPE_CHECKING

from langchain.memory import ChatMessageHistory, FileChatMessageHistory
from langchain_community.chat_message_histories import ChatMessageHistory, FileChatMessageHistory
from langchain_core.chat_history import AIMessage, BaseChatMessageHistory

from paita.ai.enums import Role
Expand Down
6 changes: 1 addition & 5 deletions src/paita/tui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ def exit_settings(self, changed: bool = False): # noqa: FBT001, FBT002
self.init_chat()

async def on_mount(self) -> None:
# TODO: If history is loaded here then scroll to end works
# however input area text doesn't work properly
# when calling _mount_chat_history later then text input works but scroll not
# await self._mount_chat_history()
await self._mount_chat_history()
try:
await self.push_screen(WaitScreen(label.APP_LIST_AI_SERVICES_MODELS))
await self._list_models()
Expand All @@ -130,7 +127,6 @@ async def on_mount(self) -> None:
self.exit,
)
return
await self._mount_chat_history()
# Read existing settings or open settings screen
try:
self._settings: SettingsManager = await SettingsManager.load(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ai/test_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ai_service_models = {
AIService.AWSBedRock.value: "anthropic.claude-v2",
AIService.OpenAI.value: "gpt-3.5-turbo",
AIService.Ollama.value: "openchat",
AIService.Ollama.value: "llama3:latest",
}


Expand Down

0 comments on commit 66d782e

Please sign in to comment.