mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
readme update
This commit is contained in:
commit
8c431c690e
@ -206,8 +206,6 @@ If you have a powerful computer or a server that you can use, but you want to us
|
||||
|
||||
### 1️⃣ **Set up and start the server scripts**
|
||||
|
||||
You need to have ollama installed on the server (We will integrate VLLM and llama.cpp soon).
|
||||
|
||||
On your "server" that will run the AI model, get the ip address
|
||||
|
||||
```sh
|
||||
|
@ -37,4 +37,4 @@ case "$OS_TYPE" in
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Installation process finished!"
|
||||
echo "Installation process finished!"
|
||||
|
17
server/sources/decorator.py
Normal file
17
server/sources/decorator.py
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
def timer_decorator(func):
|
||||
"""
|
||||
Decorator to measure the execution time of a function.
|
||||
Usage:
|
||||
@timer_decorator
|
||||
def my_function():
|
||||
# code to execute
|
||||
"""
|
||||
from time import time
|
||||
def wrapper(*args, **kwargs):
|
||||
start_time = time()
|
||||
result = func(*args, **kwargs)
|
||||
end_time = time()
|
||||
print(f"\n{func.__name__} took {end_time - start_time:.2f} seconds to execute\n")
|
||||
return result
|
||||
return wrapper
|
@ -1,6 +1,7 @@
|
||||
|
||||
from .generator import GeneratorLLM
|
||||
from llama_cpp import Llama
|
||||
from decorator import timer_decorator
|
||||
|
||||
class LlamacppLLM(GeneratorLLM):
|
||||
|
||||
@ -11,6 +12,7 @@ class LlamacppLLM(GeneratorLLM):
|
||||
super().__init__()
|
||||
self.llm = None
|
||||
|
||||
@timer_decorator
|
||||
def generate(self, history):
|
||||
if self.llm is None:
|
||||
self.logger.info(f"Loading {self.model}...")
|
||||
|
@ -78,7 +78,7 @@ def create_driver(headless=False):
|
||||
|
||||
class Browser:
|
||||
def __init__(self, driver, anticaptcha_install=True):
|
||||
"""Initialize the browser with optional headless mode."""
|
||||
"""Initialize the browser with optional AntiCaptcha installation."""
|
||||
self.js_scripts_folder = "./sources/web_scripts/" if not __name__ == "__main__" else "./web_scripts/"
|
||||
self.anticaptcha = "https://chrome.google.com/webstore/detail/nopecha-captcha-solver/dknlfmjaanfblgfdfebhijalfmhmjjjo/related"
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user