This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import logging | |
import json | |
from typing import Dict, Any | |
from ollama import AsyncClient | |
import aiohttp | |
#USER_QUERY = "Generate a report about the solar system" | |
#USER_QUERY = "Generate a report about large language models" | |
USER_QUERY = "Rédige un rapport complet sur les transformations à venir dans le monde du travail, causées par l'intelligence artificielle abordable et démocratisée." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import aiohttp | |
import datetime | |
from contextlib import asynccontextmanager | |
from typing import AsyncIterator | |
from mcp.server.fastmcp import FastMCP, Context | |
from mcp.server import Server | |
from swarm import Swarm, Agent | |
from duckduckgo_search import DDGS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ollama | |
import os | |
import sys | |
import time | |
import requests | |
import uuid | |
import json | |
import colorama | |
from ollama import Client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ollama | |
import colorama | |
import os | |
import time | |
import requests | |
import json | |
B_RED = colorama.Back.RED | |
RED = colorama.Fore.RED | |
BLUE = colorama.Fore.BLUE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Script de gestion d'interaction avec un modèle linguistique d'intelligence artificielle (LLM). | |
Ce script permet l'échange bidirectionnel de messages entre un utilisateur humain et une intelligence artificielle, | |
en utilisant le modèle linguistique de son choix, avec Ollama. | |
Il incorpore des fonctionnalités telles que la recherche web, la résolution d'informations en temps réel, | |
et l'intégration de mémoires internes pour améliorer les capacités de réponse et d'apprentissage continu du système. | |
Auteurs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('\nStart\n') | |
import time # noqa: E402 | |
start_time = time.perf_counter() | |
import os # noqa: E402 | |
import html # noqa: E402 | |
import datetime # noqa: E402 | |
import asyncio # noqa: E402 | |
import websockets # noqa: E402 | |
import json # noqa: E402 | |
import logging # noqa: E402 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import time | |
import asyncio | |
import aiohttp | |
import requests | |
import json | |
from langchain_experimental.llms.ollama_functions import OllamaFunctions | |
from langchain_core.messages import AIMessage, HumanMessage | |
from aiogram import Bot, Dispatcher, F | |
from aiogram.enums import ParseMode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Debian 12 US - 01/01/2024 | |
## | |
## assuming your default user is "debian" | |
## assuming your Windows Server 2016 minimum is the CA for the domain | |
## you have to issue a certificate from your CA to proxy.yourdomain.local (for CN and DNS alt name. You can add IP alt name) | |
## (build a CSR with an online tool and KEEP the private key | |
## !! you also need to enable the option which says this certificate will be used to issue other certificate) !! | |
## | |
## COMPUTER NAME of the proxy is different of the value used for proxy settings : | |
## computer name : LINUX01(.yourdomain.local) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# crontab -e | |
# 0 3 * * * /bin/bash /root/update_ubuntu_netboot.sh | |
# apt install syslinux-common | |
#============================================= | |
ubuntu_files='/srv/tftp/images/ubuntu' | |
iso_location='/srv/tftp/images/ISO' | |
dist=("focal" "jammy") | |
# focal 20.04 | |
# jammy 22.04 |