mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 19:15:28 +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**
|
### 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
|
On your "server" that will run the AI model, get the ip address
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
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 .generator import GeneratorLLM
|
||||||
from llama_cpp import Llama
|
from llama_cpp import Llama
|
||||||
|
from decorator import timer_decorator
|
||||||
|
|
||||||
class LlamacppLLM(GeneratorLLM):
|
class LlamacppLLM(GeneratorLLM):
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ class LlamacppLLM(GeneratorLLM):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.llm = None
|
self.llm = None
|
||||||
|
|
||||||
|
@timer_decorator
|
||||||
def generate(self, history):
|
def generate(self, history):
|
||||||
if self.llm is None:
|
if self.llm is None:
|
||||||
self.logger.info(f"Loading {self.model}...")
|
self.logger.info(f"Loading {self.model}...")
|
||||||
|
@ -78,7 +78,7 @@ def create_driver(headless=False):
|
|||||||
|
|
||||||
class Browser:
|
class Browser:
|
||||||
def __init__(self, driver, anticaptcha_install=True):
|
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.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"
|
self.anticaptcha = "https://chrome.google.com/webstore/detail/nopecha-captcha-solver/dknlfmjaanfblgfdfebhijalfmhmjjjo/related"
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user