{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Creating a Discussion\n", "\n", "The simplest task you can accomplish with this library is to create a small discussion between LLMs. \n", "\n", "This guide will teach you the basic setup of the library. You will understand how to setup models, user-agents and how to coordinate them in a discussion. By the end of htis guide, you will be able to run a small discussion with a moderator and save it to the disk for persistence." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Basics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### The Model\n", "\n", "SynDisco can theoretically support any LLM, as long as it is wrapped in a `BaseModel` wrapper. The `BaseModel` class is a very simple interface with one method. This method gives the underlying LLM input, and returns its output to the library.\n", "\n", "There already exists a `TransformersModel` class which handles models from the `transformers` python library. In 90% of your applications, this will be enough. We can load a TransformersModel using the following code:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2025-04-04T13:14:26.434159Z", "iopub.status.busy": "2025-04-04T13:14:26.433413Z", "iopub.status.idle": "2025-04-04T13:17:17.032081Z", "shell.execute_reply": "2025-04-04T13:17:17.031468Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/media/SSD_2TB/dtsirmpas_data/software/miniconda3/envs/syndisco/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\r", "Fetching 4 files: 0%| | 0/4 [00:00