Merge branch 'master' of https://git.d-popov.com/popov/ai-kevin
This commit is contained in:
19
.env
19
.env
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
TTS_BACKEND_URL=http://192.168.0.10:9008/asr
|
TTS_BACKEND_URL=http://192.168.0.10:9009/asr
|
||||||
#TTS_BACKEND_URL=http://localhost:9001/asr #gpu 9002-cpu
|
#TTS_BACKEND_URL=http://localhost:9001/asr #gpu 9002-cpu
|
||||||
TTS_BACKEND_URL2=http://localhost:9002/asr
|
TTS_BACKEND_URL2=http://localhost:9002/asr
|
||||||
TTS_BACKEND_URL3=http://192.168.0.10:9008/asr #gpu
|
TTS_BACKEND_URL3=http://192.168.0.10:9008/asr #gpu
|
||||||
@ -11,10 +11,17 @@ SERVER_PORT_HTTP=3005
|
|||||||
|
|
||||||
# aider
|
# aider
|
||||||
AIDER_MODEL=
|
AIDER_MODEL=
|
||||||
AIDER_4=
|
AIDER_4=false
|
||||||
AIDER_35TURBO=
|
#AIDER_35TURBO=
|
||||||
|
|
||||||
# OPENAI_API_KEY=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
|
# OPENAI_API_KEY=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
|
||||||
OPENAI_API_BASE=https://api.deepseek.com/v1
|
# OPENAI_API_BASE=https://api.deepseek.com/v1
|
||||||
OPENAI_API_KEY=sk-99df7736351f4536bd72cd64a416318a
|
# OPENAI_API_KEY=sk-99df7736351f4536bd72cd64a416318a
|
||||||
AIDER_MODEL=deepseek-coder #deepseek-coder, deepseek-chat
|
# AIDER_MODEL=deepseek-coder #deepseek-coder, deepseek-chat
|
||||||
|
|
||||||
|
|
||||||
|
GROQ_API_KEY=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
|
||||||
|
aider --model groq/llama3-70b-8192
|
||||||
|
|
||||||
|
# List models available from Groq
|
||||||
|
aider --models groq/
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@ tts/*.m4a
|
|||||||
agent-mobile/jdk/*
|
agent-mobile/jdk/*
|
||||||
agent-mobile/artimobile/supervisord.pid
|
agent-mobile/artimobile/supervisord.pid
|
||||||
agent-pyter/lag-llama
|
agent-pyter/lag-llama
|
||||||
|
agent-pyter/google-chrome-stable_current_amd64.deb
|
||||||
|
58
.vscode/launch.json
vendored
58
.vscode/launch.json
vendored
@ -1,35 +1,27 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
// {
|
||||||
"name": "Docker Node.js Launch",
|
// "name": "Docker Node.js Launch",
|
||||||
"type": "docker",
|
// "type": "docker",
|
||||||
"request": "launch",
|
// "request": "launch",
|
||||||
"preLaunchTask": "docker-run: debug",
|
// "preLaunchTask": "docker-run: debug",
|
||||||
"platform": "node"
|
// "platform": "node"
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
"name": "Docker Python Launch?",
|
// "name": "Docker Python Launch?",
|
||||||
"type": "python",
|
// "type": "python",
|
||||||
"request": "launch",
|
// "request": "launch",
|
||||||
"program": "${workspaceFolder}/agent-py-bot/agent.py",
|
// "program": "${workspaceFolder}/agent-py-bot/agent.py",
|
||||||
"console": "integratedTerminal",
|
// "console": "integratedTerminal"
|
||||||
// "python": "${command:python.interpreterPath}", // Assumes Python extension is installed
|
// },
|
||||||
// "preLaunchTask": "docker-run: python-debug", // You may need to create this task
|
|
||||||
// "env": {
|
|
||||||
// "PYTHONUNBUFFERED": "1"
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Docker Python Launch with venv",
|
"name": "Docker Python Launch with venv",
|
||||||
"type": "debugpy",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/agent-py-bot/agent.py",
|
"program": "${workspaceFolder}/agent-py-bot/agent.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"python": "/venv/bin/python", // Path to the Python interpreter in your venv
|
"python": "/venv/bin/python",
|
||||||
"env": {
|
"env": {
|
||||||
"PYTHONUNBUFFERED": "1"
|
"PYTHONUNBUFFERED": "1"
|
||||||
}
|
}
|
||||||
@ -42,7 +34,25 @@
|
|||||||
"skipFiles": [
|
"skipFiles": [
|
||||||
"<node_internals>/**"
|
"<node_internals>/**"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python Debugger: Python File",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python Debugger: Python File with Conda",
|
||||||
|
"type": "debugpy",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
//"python": "${command:python.interpreterPath}",
|
||||||
|
"python": "/config/miniconda3/envs/py/bin/python",
|
||||||
|
"presentation": {
|
||||||
|
"clear": true
|
||||||
|
},
|
||||||
|
//"preLaunchTask": "conda-activate" // Name of your pre-launch task
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
48
.vscode/tasks.json
vendored
48
.vscode/tasks.json
vendored
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
// {
|
||||||
"type": "docker-build",
|
// "type": "docker-build",
|
||||||
"label": "docker-build",
|
// "label": "docker-build",
|
||||||
"platform": "node",
|
// "platform": "node",
|
||||||
"dockerBuild": {
|
// "dockerBuild": {
|
||||||
"dockerfile": "${workspaceFolder}/Dockerfile",
|
// "dockerfile": "${workspaceFolder}/Dockerfile",
|
||||||
"context": "${workspaceFolder}",
|
// "context": "${workspaceFolder}",
|
||||||
"pull": true
|
// "pull": true
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
"type": "docker-run",
|
// "type": "docker-run",
|
||||||
"label": "docker-run: release",
|
// "label": "docker-run: release",
|
||||||
"dependsOn": [
|
// "dependsOn": [
|
||||||
"docker-build"
|
// "docker-build"
|
||||||
],
|
// ],
|
||||||
"platform": "node"
|
// "platform": "node"
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// "type": "docker-run",
|
// "type": "docker-run",
|
||||||
// "label": "docker-run: debug2",
|
// "label": "docker-run: debug2",
|
||||||
@ -85,6 +85,18 @@
|
|||||||
"reveal": "always",
|
"reveal": "always",
|
||||||
"panel": "new"
|
"panel": "new"
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "conda-activate",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "source ~/miniconda3/etc/profile.d/conda.sh && conda activate py && echo 'Activated Conda Environment (py)!'",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"options": {
|
||||||
|
"shell": {
|
||||||
|
"executable": "/bin/bash",
|
||||||
|
"args": ["-c"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
11
_doc/aider.md
Normal file
11
_doc/aider.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
python -m pip install git+https://github.com/d-popov/aider.git
|
||||||
|
|
||||||
|
|
||||||
|
export GROQ_API_KEY=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
|
||||||
|
aider --models groq/
|
||||||
|
aider --model groq/llama3-70b-8192 --no-auto-commits
|
||||||
|
|
||||||
|
|
||||||
|
#@ OLLAMA
|
||||||
|
export OPENAI_API_BASE=https://ollama.d-popov.com
|
||||||
|
aider --openai-api-base https://ollama.d-popov.com --openai-api-key ol-ddddd --models openai/
|
@ -15,7 +15,7 @@ interpreter --api_base http://192.168.0.11:11434/v1 --api_key "" --model openai/
|
|||||||
interpreter --api_base http://192.168.0.137:1234/v1 --api_key "" --model openai/local
|
interpreter --api_base http://192.168.0.137:1234/v1 --api_key "" --model openai/local
|
||||||
192.168.0.137
|
192.168.0.137
|
||||||
|
|
||||||
|
GROQ_API_KEY
|
||||||
# ################################ GROQ ########################## working
|
# ################################ GROQ ########################## working
|
||||||
export OPENAI_API_KEY=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
|
export OPENAI_API_KEY=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
|
||||||
interpreter -y --api_base https://api.groq.com/openai/v1 --model llama2-70b-4096 ## mixtral-8x7b-32768 # gemma-7b-it # llama2-70b-4096
|
interpreter -y --api_base https://api.groq.com/openai/v1 --model llama2-70b-4096 ## mixtral-8x7b-32768 # gemma-7b-it # llama2-70b-4096
|
||||||
|
@ -1,10 +1,67 @@
|
|||||||
|
|
||||||
|
# source /path/to/virtualenv/bin/activate # On Unix or MacOS
|
||||||
|
# source /config/miniconda3/envs/py/bin/activate
|
||||||
|
# pip install requests beautifulsoup4 schedule selenium
|
||||||
|
|
||||||
|
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||||
|
# sudo dpkg -i google-chrome-stable_current_amd64.deb
|
||||||
|
# apt install libnss3 libxss1
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
# import schedule
|
# # import schedule
|
||||||
|
import time
|
||||||
|
from selenium import webdriver
|
||||||
|
from selenium.webdriver.chrome.service import Service
|
||||||
|
from webdriver_manager.chrome import ChromeDriverManager
|
||||||
import time
|
import time
|
||||||
# pip install requests beautifulsoup4 schedule
|
# pip install requests beautifulsoup4 schedule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Initialize WebDriver
|
||||||
|
service = Service(ChromeDriverManager().install())
|
||||||
|
driver = webdriver.Chrome(service=service)
|
||||||
|
|
||||||
|
def check_pairs_sel():
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Open the page
|
||||||
|
driver.get("https://www.dextools.io/app/en/bnb/pool-explorer")
|
||||||
|
time.sleep(10) # Wait for JavaScript to execute
|
||||||
|
|
||||||
|
# Extract the page source
|
||||||
|
html = driver.page_source
|
||||||
|
soup = BeautifulSoup(html, 'html.parser')
|
||||||
|
|
||||||
|
# Assuming the pairs are listed in <div> tags with a class that includes the word 'pair'
|
||||||
|
pairs = soup.find_all('div', class_=lambda x: x and 'pair' in x)
|
||||||
|
print("Pairs found:", [pair.text for pair in pairs])
|
||||||
|
finally:
|
||||||
|
driver.quit()
|
||||||
|
|
||||||
|
|
||||||
|
# Initialize WebDriver
|
||||||
|
service = Service(ChromeDriverManager().install())
|
||||||
|
driver = webdriver.Chrome(service=service)
|
||||||
|
|
||||||
|
def check_pairs_sel():
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Open the page
|
||||||
|
driver.get("https://www.dextools.io/app/en/bnb/pool-explorer")
|
||||||
|
time.sleep(10) # Wait for JavaScript to execute
|
||||||
|
|
||||||
|
# Extract the page source
|
||||||
|
html = driver.page_source
|
||||||
|
soup = BeautifulSoup(html, 'html.parser')
|
||||||
|
|
||||||
|
# Assuming the pairs are listed in <div> tags with a class that includes the word 'pair'
|
||||||
|
pairs = soup.find_all('div', class_=lambda x: x and 'pair' in x)
|
||||||
|
print("Pairs found:", [pair.text for pair in pairs])
|
||||||
|
finally:
|
||||||
|
driver.quit()
|
||||||
|
|
||||||
def check_new_pairs():
|
def check_new_pairs():
|
||||||
# log the running time
|
# log the running time
|
||||||
print("Checking for new pairs...")
|
print("Checking for new pairs...")
|
||||||
@ -14,7 +71,7 @@ def check_new_pairs():
|
|||||||
soup = BeautifulSoup(response.text, 'html.parser')
|
soup = BeautifulSoup(response.text, 'html.parser')
|
||||||
|
|
||||||
# make html dump to ./dextools-last.html
|
# make html dump to ./dextools-last.html
|
||||||
with open('dextools-last.html', 'w') as f:
|
with open('./dextools-last.html', 'w') as f:
|
||||||
f.write(soup.prettify())
|
f.write(soup.prettify())
|
||||||
|
|
||||||
# Assuming the pairs are listed in <div> tags with a class that includes the word 'pair'
|
# Assuming the pairs are listed in <div> tags with a class that includes the word 'pair'
|
||||||
@ -38,7 +95,7 @@ def main():
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
# schedule.run_pending()
|
# schedule.run_pending()
|
||||||
check_new_pairs()
|
check_pairs_sel()
|
||||||
time.sleep(10000)
|
time.sleep(10000)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
1
agent-pyter/prompts.txt
Normal file
1
agent-pyter/prompts.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
create python app that will monitor for new pairs on https://dextools.io and trigger event immediately when there is new token
|
@ -29,6 +29,10 @@
|
|||||||
<option value="en">English</option>
|
<option value="en">English</option>
|
||||||
<option value="bg">Български</option>
|
<option value="bg">Български</option>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="task-select">
|
||||||
|
<option value="transcribe">Transcribe</option>
|
||||||
|
<option value="translate">Translate</option>
|
||||||
|
</select>
|
||||||
<label class="toggle flex items-center ml-4">
|
<label class="toggle flex items-center ml-4">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="store-recordings"
|
id="store-recordings"
|
||||||
|
Reference in New Issue
Block a user