Skip to content

Commit

Permalink
Merge pull request #666 from mraniki/dev
Browse files Browse the repository at this point in the history
♻️⬆️dep downgrade
  • Loading branch information
mraniki authored Aug 18, 2023
2 parents d9a16ee + 41aaddf commit 70a8b96
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 45 deletions.
38 changes: 18 additions & 20 deletions .requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,31 @@ aiofiles==23.2.1 ; python_version >= "3.10" and python_version < "4.0"
aiohttp-socks==0.7.1 ; python_version >= "3.10" and python_version < "4.0"
aiohttp==3.8.5 ; python_version >= "3.10" and python_version < "4.0"
aiosignal==1.3.1 ; python_version >= "3.10" and python_version < "4.0"
annotated-types==0.5.0 ; python_version >= "3.10" and python_version < "4.0"
anyio==3.7.1 ; python_version >= "3.10" and python_version < "4.0"
appdirs==1.4.4 ; python_version >= "3.10" and python_version < "4.0"
apprise==1.4.5 ; python_version >= "3.10" and python_version < "4.0"
async-timeout==4.0.3 ; python_version >= "3.10" and python_version < "4.0"
asyncio==3.4.3 ; python_version >= "3.10" and python_version < "4.0"
asyncz==0.5.0 ; python_version >= "3.10" and python_version < "4.0"
asyncz==0.3.1 ; python_version >= "3.10" and python_version < "4.0"
attrs==23.1.0 ; python_version >= "3.10" and python_version < "4.0"
beautifulsoup4==4.12.2 ; python_version >= "3.10" and python_version < "4.0"
bitarray==2.8.1 ; python_version >= "3.10" and python_version < "4"
blurhash==1.1.4 ; python_version >= "3.10" and python_version < "4.0"
browser-cookie3==0.19.1 ; python_version >= "3.10" and python_version < "4.0"
ccxt==4.0.58 ; python_version >= "3.10" and python_version < "4.0"
cefi==1.1.13 ; python_version >= "3.10" and python_version < "4.0"
ccxt==4.0.67 ; python_version >= "3.10" and python_version < "4.0"
cefi==1.1.16 ; python_version >= "3.10" and python_version < "4.0"
certifi==2023.7.22 ; python_version >= "3.10" and python_version < "4.0"
cffi==1.15.1 ; python_version >= "3.10" and python_version < "4.0"
charset-normalizer==3.2.0 ; python_version >= "3.10" and python_version < "4.0"
click==8.1.6 ; python_version >= "3.10" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.10" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows")
cryptography==41.0.3 ; python_version >= "3.10" and python_version < "4.0"
curl-cffi==0.5.7 ; python_version >= "3.10" and python_version < "4.0"
cytoolz==0.12.2 ; python_version >= "3.10" and python_version < "4" and implementation_name == "cpython"
decorator==5.1.1 ; python_version >= "3.10" and python_version < "4.0"
dxsp==4.2.25 ; python_version >= "3.10" and python_version < "4.0"
dxsp==4.2.26 ; python_version >= "3.10" and python_version < "4.0"
dynaconf==3.2.1 ; python_version >= "3.10" and python_version < "4.0"
emoji==2.7.0 ; python_version >= "3.10" and python_version < "4.0"
emoji==2.8.0 ; python_version >= "3.10" and python_version < "4.0"
eth-abi==4.1.0 ; python_version >= "3.10" and python_version < "4"
eth-account==0.9.0 ; python_version >= "3.10" and python_version < "4"
eth-hash==0.5.2 ; python_version >= "3.10" and python_version < "4"
Expand All @@ -39,13 +38,13 @@ eth-keys==0.4.0 ; python_version >= "3.10" and python_version < "4"
eth-rlp==0.3.0 ; python_version >= "3.10" and python_version < "4"
eth-typing==3.4.0 ; python_version >= "3.10" and python_version < "4"
eth-utils==2.2.0 ; python_version >= "3.10" and python_version < "4"
exceptiongroup==1.1.2 ; python_version >= "3.10" and python_version < "3.11"
fastapi==0.101.0 ; python_version >= "3.10" and python_version < "4.0"
findmyorder==1.7.16 ; python_version >= "3.10" and python_version < "4.0"
exceptiongroup==1.1.3 ; python_version >= "3.10" and python_version < "3.11"
fastapi==0.99.1 ; python_version >= "3.10" and python_version < "4.0"
findmyorder==1.7.17 ; python_version >= "3.10" and python_version < "4.0"
frozendict==2.3.8 ; python_version >= "3.10" and python_version < "4.0"
frozenlist==1.4.0 ; python_version >= "3.10" and python_version < "4.0"
future==0.18.3 ; python_version >= "3.10" and python_version < "4.0"
g4f==0.0.1.4 ; python_version >= "3.10" and python_version < "4.0"
g4f==0.0.1.7 ; python_version >= "3.10" and python_version < "4.0"
grpcio==1.57.0 ; python_version >= "3.10" and python_version < "4.0"
guilded-py==1.10.0 ; python_version >= "3.10" and python_version < "4.0"
h11==0.14.0 ; python_version >= "3.10" and python_version < "4.0"
Expand All @@ -56,15 +55,15 @@ html5lib==1.1 ; python_version >= "3.10" and python_version < "4.0"
httpcore==0.17.3 ; python_version >= "3.10" and python_version < "4.0"
httpx==0.24.1 ; python_version >= "3.10" and python_version < "4.0"
hyperframe==6.0.1 ; python_version >= "3.10" and python_version < "4.0"
iamlistening==3.3.4 ; python_version >= "3.10" and python_version < "4.0"
iamlistening==3.3.6 ; python_version >= "3.10" and python_version < "4.0"
idna==3.4 ; python_version >= "3.10" and python_version < "4.0"
iso8601==2.0.0 ; python_version >= "3.10" and python_version < "4.0"
jeepney==0.8.0 ; python_version >= "3.10" and (sys_platform == "bsd" or sys_platform == "linux") and python_version < "4.0"
js2py==0.74 ; python_version >= "3.10" and python_version < "4.0"
jsonschema-specifications==2023.7.1 ; python_version >= "3.10" and python_version < "4.0"
jsonschema==4.19.0 ; python_version >= "3.10" and python_version < "4.0"
logbook==1.6.0 ; python_version >= "3.10" and python_version < "4.0"
loguru==0.7.0 ; python_version >= "3.10" and python_version < "4.0"
loguru==0.6.0 ; python_version >= "3.10" and python_version < "4.0"
lru-dict==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
lxml==4.9.3 ; python_version >= "3.10" and python_version < "4.0"
lz4==4.3.2 ; python_version >= "3.10" and python_version < "4.0"
Expand All @@ -73,7 +72,7 @@ mastodon-py==1.8.1 ; python_version >= "3.10" and python_version < "4.0"
matrix-nio==0.20.2 ; python_version >= "3.10" and python_version < "4.0"
multidict==6.0.4 ; python_version >= "3.10" and python_version < "4.0"
multitasking==0.0.11 ; python_version >= "3.10" and python_version < "4.0"
myllm==1.2.11 ; python_version >= "3.10" and python_version < "4.0"
myllm==1.2.15 ; python_version >= "3.10" and python_version < "4.0"
numpy==1.25.2 ; python_version >= "3.10" and python_version < "4.0"
oauthlib==3.2.2 ; python_version >= "3.10" and python_version < "4.0"
packaging==23.1 ; python_version >= "3.10" and python_version < "4.0"
Expand All @@ -91,8 +90,7 @@ pycoingecko==3.1.0 ; python_version >= "3.10" and python_version < "4.0"
pycparser==2.21 ; python_version >= "3.10" and python_version < "4.0"
pycryptodome==3.18.0 ; python_version >= "3.10" and python_version < "4.0"
pycryptodomex==3.18.0 ; python_version >= "3.10" and python_version < "4.0"
pydantic-core==2.4.0 ; python_version >= "3.10" and python_version < "4.0"
pydantic==2.1.1 ; python_version >= "3.10" and python_version < "4.0"
pydantic==1.10.12 ; python_version >= "3.10" and python_version < "4.0"
pyexecjs==1.5.1 ; python_version >= "3.10" and python_version < "4.0"
pyjsparser==2.7.1 ; python_version >= "3.10" and python_version < "4.0"
pyparsing==3.1.1 ; python_version >= "3.10" and python_version < "4.0"
Expand All @@ -117,19 +115,19 @@ rlp==3.0.0 ; python_version >= "3.10" and python_version < "4"
rocketchat-api==1.30.0 ; python_version >= "3.10" and python_version < "4.0"
rpds-py==0.9.2 ; python_version >= "3.10" and python_version < "4.0"
rsa==4.9 ; python_version >= "3.10" and python_version < "4"
setuptools==68.0.0 ; python_version >= "3.10" and python_version < "4.0"
setuptools==68.1.0 ; python_version >= "3.10" and python_version < "4.0"
simplematrixbotlib==2.10.0 ; python_version >= "3.10" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.10" and python_version < "4.0"
sniffio==1.3.0 ; python_version >= "3.10" and python_version < "4.0"
soupsieve==2.4.1 ; python_version >= "3.10" and python_version < "4.0"
starlette==0.27.0 ; python_version >= "3.10" and python_version < "4.0"
talkytrend==1.13.2 ; python_version >= "3.10" and python_version < "4.0"
talkytrend==1.13.4 ; python_version >= "3.10" and python_version < "4.0"
telethon==1.29.2 ; python_version >= "3.10" and python_version < "4.0"
tinode-grpc==0.22.3 ; python_version >= "3.10" and python_version < "4.0"
toml==0.10.2 ; python_version >= "3.10" and python_version < "4.0"
toolz==0.12.0 ; python_version >= "3.10" and python_version < "4" and (implementation_name == "pypy" or implementation_name == "cpython")
tradingview-ta==3.3.0 ; python_version >= "3.10" and python_version < "4.0"
twitchio==2.6.0 ; python_version >= "3.10" and python_version < "4.0"
twitchio==2.7.0 ; python_version >= "3.10" and python_version < "4.0"
typing-extensions==4.7.1 ; python_version >= "3.10" and python_version < "4.0"
tzdata==2023.3 ; python_version >= "3.10" and python_version < "4.0"
tzlocal==4.3.1 ; python_version >= "3.10" and python_version < "4.0"
Expand All @@ -145,4 +143,4 @@ websockets==11.0.3 ; python_version >= "3.10" and python_version < "4.0"
win32-setctime==1.1.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
xmltodict==0.13.0 ; python_version >= "3.10" and python_version < "4.0"
yarl==1.9.2 ; python_version >= "3.10" and python_version < "4.0"
yfinance==0.2.27 ; python_version >= "3.10" and python_version < "4.0"
yfinance==0.2.28 ; python_version >= "3.10" and python_version < "4.0"
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TalkyTrader

* **Aren't there already projects that do this?**

Project available usually focused on a given messaging platform (e.g. telegram), a given type of exchange (usually binance), a given type of trading (snipping DEX https://github.com/Nafidinara/bot-pancakeswap or CEXX) or full suite trading with CEX focus (https://github.com/Drakkar-Software/OctoBot, https://github.com/freqtrade/freqtrade https://github.com/hummingbot/hummingbot).
Project available usually focused on a given messaging platform (e.g. telegram), a given type of exchange (usually binance), a given type of trading (snipping DEX https://github.com/Nafidinara/bot-pancakeswap or CEX) or full suite trading with CEX focus (https://github.com/Drakkar-Software/OctoBot, https://github.com/freqtrade/freqtrade https://github.com/hummingbot/hummingbot).


User Guide
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ classifiers = [
[tool.poetry.dependencies]
python = "^3.10"
dynaconf = "^3.1.12"
loguru = "^0.7.0"
asyncz = "^0.5.0"
loguru = "^0.6.0"
asyncz = "^0.3.1"
apprise= "^1.4.0"
httpx = "^0.24.1"
uvicorn = "^0.23.0"
fastapi = "^0.101.0"
fastapi = "^0.99.0"
ping3 = "^4.0.4"
cefi = "^1.1.13"
dxsp = "^4.2.25"
findmyorder = "^1.7.16"
iamlistening = "^3.3.4"
iamlistening = "^3.3.5"
talkytrend = "^1.13.2"
myllm = "^1.2.11"
myllm = "^1.2.15"


[tool.poetry.group.dev.dependencies]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_llm_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ async def test_parsing_info(plugin):
@pytest.mark.asyncio
async def test_parsing_llm(plugin):
"""Test scr """
plugin.get_llm_run = AsyncMock()
plugin.llm.talk = AsyncMock()
await plugin.handle_message(
f"{settings.bot_prefix}{settings.bot_command_question} hello")
plugin.get_llm_run.assert_awaited_once()
plugin.llm.talk.assert_awaited_once()


@pytest.mark.asyncio
Expand All @@ -82,6 +82,6 @@ async def test_info(plugin):
@pytest.mark.asyncio
async def test_llm_request(plugin):
"""Test llm """
result = await plugin.get_llm_run(prompt="tell me a story")
result = await plugin.llm.chat(prompt="tell me a story")
print(result)
assert result is not None
18 changes: 2 additions & 16 deletions tt/plugins/default_plugins/llm_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ async def handle_message(self, msg):
command_mapping = {
settings.bot_command_help: self.get_llm_help,
settings.bot_command_info: self.get_llm_info,
settings.bot_command_question: lambda: self.get_llm_run(args),
settings.bot_command_topic: lambda: self.get_llm_chain(args),
settings.bot_command_question: lambda: self.llm.talk(args),
settings.bot_command_topic: lambda: self.llm.chat(args),
}
if command in command_mapping:
function = command_mapping[command]
Expand All @@ -61,18 +61,4 @@ async def get_llm_info(self):
"""info Message"""
return self.version

async def get_llm_run(self,prompt):
"""
Gets the llm prompts response
"""

return await self.llm.talk(prompt)

async def get_llm_chain(self,prompt):
"""
Gets the llm prompts chain response
"""

pass


0 comments on commit 70a8b96

Please sign in to comment.