pydantic-ai
├── LICENSE
├── Makefile
├── README.md
├── docs
│ ├── _worker.js
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 polars as pl | |
from datasets import load_from_disk | |
ds = load_from_disk("/home/arthrod/finlandia/form-d-a/edgar_filings/train/") | |
arrow_table = ds.data.table | |
lazy_df = pl.from_arrow(arrow_table) | |
filtered_lazy = lazy_df.filter(pl.col("form").eq("D/A")).limit(1000) |
This gist documents two working approaches for Model Context Protocol (MCP) server configurations in Claude Desktop environments.
This approach uses a shell script to execute commands and works in Claude Desktop and Cursor.
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 python3 | |
# /// script | |
# requires-python = ">=3.12" | |
# dependencies = [ | |
# "typer", | |
# "rich", | |
# ] | |
# /// | |
""" | |
JSONL Processor - A tool to modify JSONL files by adding or renaming keys, and merging multiple files. |
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 | |
# requires-python = ">=3.12" | |
# dependencies = [ | |
# "typer", | |
# "datasets", | |
# "loguru", | |
# "google-genai", | |
# "rich", | |
# ] | |
# /// |
This document consolidates all core instructions and examples for using and extending LangGraph’s prebuilt ReAct agent. It covers the following topics, along with complete code examples (using triple backticks) and the names of the required packages:
- Using the Prebuilt ReAct Agent
- Adding Thread-Level Memory
- Adding a Custom System Prompt
- Returning Structured Output
- Adding Semantic Search to Your Agent’s Memory
- Running a Graph Asynchronously
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 -S uv run --script | |
# /// script | |
# dependencies = [ | |
# "pydantic-ai", | |
# "python-dotenv", | |
# "typer", | |
# "rich", | |
# ] | |
# /// |
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
# https://docs.litellm.ai/docs/proxy/configs | |
# https://docs.litellm.ai/docs/proxy/quickstart | |
model_list: | |
# https://docs.lambdalabs.com/public-cloud/lambda-inference-api/#listing-models | |
- model_name: hermes3-70b | |
litellm_params: | |
model: openai/hermes3-70b | |
api_key: "os.environ/OPENAI_API_KEY" | |
api_base: "os.environ/OPENAI_API_BASE" |
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
""" | |
Module for interacting with the model via the OpenRouter API. | |
""" | |
import toml | |
import asyncio | |
from loguru import logger | |
from openai import OpenAI | |
import requests |
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 | |
# requires-python = ">=3.12" | |
# dependencies = [ | |
# "typer", | |
# "datasets", | |
# "loguru", | |
# "huggingface_hub", | |
# "google-genai", | |
# "aiofiles", | |
# "rich", |
NewerOlder