Skip to content

Instantly share code, notes, and snippets.

@disler
disler / README.md
Last active October 9, 2025 04:19
Four Level Framework for Prompt Engineering
@daveebbelaar
daveebbelaar / llm_factory.py
Created August 17, 2024 13:22
LLM Factory with Instructor
from typing import Any, Dict, List, Type
import instructor
from anthropic import Anthropic
from config.settings import get_settings
from openai import OpenAI
from pydantic import BaseModel, Field
class LLMFactory:
@disler
disler / README_MINIMAL_PROMPT_CHAINABLE.md
Last active July 27, 2025 06:29
Minimal Prompt Chainables - Zero LLM Library Sequential Prompt Chaining & Prompt Fusion

Minimal Prompt Chainables

Sequential prompt chaining in one method with context and output back-referencing.

Files

  • main.py - start here - full example using MinimalChainable from chain.py to build a sequential prompt chain
  • chain.py - contains zero library minimal prompt chain class
  • chain_test.py - tests for chain.py, you can ignore this
  • requirements.py - python requirements

Setup

@disler
disler / README.md
Created March 31, 2024 14:34
Use these Prompt Chains to build HIGH QUALITY AI Agents (Agentic Building Blocks)

Setup

  1. Create a new directory with these three files (requirements.txt, main.py, README.md)
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. python main.py
  6. Update main() to run the example prompt chains
@disler
disler / standards_for_true_ai_coding_assistants.md
Created January 21, 2024 16:30
Standards For True AI Coding Assistants

What is an AI Coding Assistant?

If the coding assistant can't run ITERATIVE CRUD on ALL of your code, it's not a True AI Coding Assistant (TACA)

Standards for TRUE AI Coding Assistants

  1. Must work on existing codebases
  2. Must have a file context mechanism
  3. Must be iteratively controllable
@VYV7
VYV7 / PromiseDeclaration.js
Last active June 23, 2023 11:40
Creating a Promise
//---------------------------------------------------------
// Executor function is called right away when a promise is created
// Start a long running process here
// (HTTP requests, storing data to a database etc.)
const promiseExecutor = (resolve, reject) => {
setTimeout( () => {
if (1) {
resolve('Promise resolved') // called if things went well
} else {
reject('Promise rejected') // called if things went bad