Run like this from the langroid repo:
uv run examples/basic/chat-search.py -m groq/deepseek-r1-distill-llama-70b
Example screenshot:

<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="refresh" content="2"> | |
<title>LLM-Agent - Langroid Task Log</title> | |
<style> | |
body { | |
background-color: #1e1e1e; |
Run like this from the langroid repo:
uv run examples/basic/chat-search.py -m groq/deepseek-r1-distill-llama-70b
Example screenshot:
Run like this from the langroid-examples
repo after setting up the env
uv run examples/basic/tool-extract-short-example.py -m ollama/mistral-small
Sample output:
Install Langroid and run this doc-chat
example script from the examples/
folder:
uv run examples/docqa/chat.py https://arxiv.org/pdf/2501.12948
Example output:
# Simple example of getting bsky data via `atproto` python client | |
# | |
# First install: atproto, python-dotenv | |
# See python client docs here: | |
# https://github.com/MarshalX/atproto | |
# | |
from atproto import Client, IdResolver | |
import os |
// Zed settings | |
// | |
// For information on how to configure Zed, see the Zed | |
// documentation: https://zed.dev/docs/configuring-zed | |
// | |
// To see all of Zed's default settings without changing your | |
// custom settings, run the `open default settings` command | |
// from the command palette or from `Zed` application menu. | |
{ | |
// The settings for slash commands. |
from typing import Any, Callable, cast, Optional, Union | |
import textwrap | |
import chainlit as cl | |
from datetime import datetime | |
from chainlit.sync import run_sync | |
from chainlit.message import AskMessageBase, AskUserMessage, MessageStepType | |
from chainlit.types import AskSpec | |
from chainlit.step import StepDict | |
from chainlit.config import config | |
from chainlit.telemetry import trace_event |
/Users/pchalasani/Git/langroid-examples/.venv/lib/python3.11/site-packages/langroid/parsing/docu │ | |
│ ment_parser.py:301 in iterate_pages │ | |
│ │ | |
│ 298 │ def iterate_pages(self) -> Generator[Tuple[int, Any], None, None]: # type: ignore │ | |
│ 299 │ │ from unstructured.partition.pdf import partition_pdf │ | |
│ 300 │ │ │ | |
│ ❱ 301 │ │ elements = partition_pdf(file=self.doc_bytes, include_page_breaks=True) │ | |
│ 302 │ │ for i, el in enumerate(elements): │ | |
│ 303 │ │ │ yield i, el │ | |
│ 304 │ |
import blankly | |
from blankly import StrategyState | |
import numpy as np | |
def trade(state: StrategyState): | |
''' | |
Example of how to decide a trade based on ALL assets | |
''' | |
symbols = state.symbol |
''' | |
Example of using blankly to decide trade based on all asset prices using a global state-list | |
''' | |
import blankly | |
import numpy as np | |
# global list of StrategyStates, one per symbol (price_event) | |
states = [] | |
def trade(): |