From 4de527aa42425114496324b7a1071f161d181eba Mon Sep 17 00:00:00 2001 From: martin legrand Date: Mon, 21 Apr 2025 12:10:13 +0200 Subject: [PATCH] update discord link + less strict url format check --- README.md | 1 + README_CHS.md | 2 +- README_CHT.md | 2 +- sources/llm_provider.py | 18 +----------------- sources/router.py | 1 + 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d0e50b5..b53e8a2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ English | [中文](./README_CHS.md) | [繁體中文](./README_CHT.md) | [Franç > 🛠️ **Work in Progress** – Looking for contributors! + https://github.com/user-attachments/assets/4bd5faf6-459f-4f94-bd1d-238c4b331469 diff --git a/README_CHS.md b/README_CHS.md index 6da40b8..b72aa55 100644 --- a/README_CHS.md +++ b/README_CHS.md @@ -9,7 +9,7 @@ **Manus AI 的本地替代品**,它是一个具有语音功能的大语言模型秘书,可以 Coding、访问你的电脑文件、浏览网页,并自动修正错误与反省,最重要的是不会向云端传送任何资料。采用 DeepSeek R1 等推理模型构建,完全在本地硬体上运行,进而保证资料的隐私。 -[![Visit AgenticSeek](https://img.shields.io/static/v1?label=Website&message=AgenticSeek&color=blue&style=flat-square)](https://fosowl.github.io/agenticSeek.html) ![License](https://img.shields.io/badge/license-GPL--3.0-green) [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/4Ub2D6Fj) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/fosowl.svg?style=social&label=Update%20%40Fosowl)](https://x.com/Martin993886460) +[![Visit AgenticSeek](https://img.shields.io/static/v1?label=Website&message=AgenticSeek&color=blue&style=flat-square)](https://fosowl.github.io/agenticSeek.html) ![License](https://img.shields.io/badge/license-GPL--3.0-green) [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/XSTKZ8nP) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/fosowl.svg?style=social&label=Update%20%40Fosowl)](https://x.com/Martin993886460) > 🛠️ **目前还在开发阶段** – 欢迎任何贡献者加入我们! diff --git a/README_CHT.md b/README_CHT.md index 241f5bc..5d6f43c 100644 --- a/README_CHT.md +++ b/README_CHT.md @@ -10,7 +10,7 @@ **Manus AI 的本地替代品**,它是一個具有語音功能的大語言模型秘書,可以 Coding、訪問你的電腦文件、瀏覽網頁,並自動修正錯誤與反省,最重要的是不會向雲端傳送任何資料。採用 DeepSeek R1 等推理模型構建,完全在本地硬體上運行,進而保證資料的隱私。 -[![Visit AgenticSeek](https://img.shields.io/static/v1?label=Website&message=AgenticSeek&color=blue&style=flat-square)](https://fosowl.github.io/agenticSeek.html) ![License](https://img.shields.io/badge/license-GPL--3.0-green) [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/4Ub2D6Fj) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/fosowl.svg?style=social&label=Update%20%40Fosowl)](https://x.com/Martin993886460) +[![Visit AgenticSeek](https://img.shields.io/static/v1?label=Website&message=AgenticSeek&color=blue&style=flat-square)](https://fosowl.github.io/agenticSeek.html) ![License](https://img.shields.io/badge/license-GPL--3.0-green) [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/XSTKZ8nP) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/fosowl.svg?style=social&label=Update%20%40Fosowl)](https://x.com/Martin993886460) > 🛠️ **目前還在開發階段** – 歡迎任何貢獻者加入我們! diff --git a/sources/llm_provider.py b/sources/llm_provider.py index 41540f5..eeb371d 100644 --- a/sources/llm_provider.py +++ b/sources/llm_provider.py @@ -22,7 +22,7 @@ class Provider: self.provider_name = provider_name.lower() self.model = model self.is_local = is_local - self.server_ip = self.check_address_format(server_address) + self.server_ip = server_address self.available_providers = { "ollama": self.ollama_fn, "server": self.server_fn, @@ -44,7 +44,6 @@ class Provider: self.api_key = self.get_api_key(self.provider_name) elif self.provider_name != "ollama": pretty_print(f"Provider: {provider_name} initialized at {self.server_ip}", color="success") - self.check_address_format(self.server_ip) if not self.is_ip_online(self.server_ip.split(':')[0]): raise Exception(f"Server at {self.server_ip} is offline.") @@ -57,21 +56,6 @@ class Provider: exit(1) return api_key - def check_address_format(self, address): - """ - Validate if the address is valid IP. - """ - try: - address = address.replace('http://', '') - ip, port = address.rsplit(":", 1) - if all(c.lower() in ".:abcdef0123456789" for c in ip): - ipaddress.ip_address(ip) - if not port.isdigit() or not (0 <= int(port) <= 65535): - raise ValueError("Port must be a number between 0 and 65535.") - except ValueError as e: - raise Exception(f"Invalid address format: {e}. Is port specified?") - return address - def respond(self, history, verbose = True): """ Use the choosen provider to generate text. diff --git a/sources/router.py b/sources/router.py index e3743f7..9e0fe69 100644 --- a/sources/router.py +++ b/sources/router.py @@ -178,6 +178,7 @@ class AgentRouter: ("Find a public API for movie data and build a web app to display movie ratings", "HIGH"), ("Create a Node.js server that queries a public API for traffic data and displays it", "HIGH"), ("can you find api and build a python web app with it ?", "HIGH"), + ("do a deep search of current AI player for 2025 and make me a report in a file", "HIGH"), ("Find a public API for recipe data and build a web app to display recipes", "HIGH"), ("Search the web for recent space mission updates and build a Flask app", "HIGH"), ("Create a Python script to scrape a website and save data to a database", "HIGH"),