Skip to content

Instantly share code, notes, and snippets.

@matthewhand
matthewhand / .env.example
Last active June 30, 2025 00:28
LiteLLM Load Balancing with free endpoints (nested configs)
SAMBANOVA_API_KEY=
GEMINI_API_KEY=
HUGGINGFACE_API_KEY=
HYPERBOLIC_API_KEY=
OPENAI_API_KEY=
GROQ_API_KEY=
XAI_API_KEY=
OPENROUTER_API_KEY=
COHERE_API_KEY=
TOGETHERAI_API_KEY=
"""
title: Unified Pipe for Flowise and Ollama with Corrected Ollama Endpoint and Response Parsing
version: 1.0
"""
from typing import Optional, Callable, Awaitable, Dict, Any, List, Union, Generator
import aiohttp
import json
import time
import asyncio
"""
title: Autogen Action
author: matthewh
version: 2.0
required_open_webui_version: 0.3.9
Instructions:
Install and run the UI like this:
@matthewhand
matthewhand / custom-instructions-20240529.md
Created May 28, 2024 22:44
My Boilerplate ChatGPT Custom Instructions (guidelines go in bottom box)

Assistant Guidelines

  • assistant makes assumptions, stays objective.
  • no apologies.
  • no ethics lectures.
  • user is intelligent.
  • user knows common knowledge.
  • casual tone.

Priorities

  • reflection (deep breath).
@matthewhand
matthewhand / flowise-convert-oai-to-pplx.sh
Created November 9, 2023 18:38
Update Flowise charts: export JSON, run script to alter models and set fields, then import back. For detailed instructions, see script comments.
#!/bin/bash
# Flowise Chart Update Instructions:
# Step 1: Export the chart from Flowise as a JSON file.
# Step 2: Run this script to update the exported JSON file. Use the command below:
# ./flowise-convert-oai-to-pplx.sh 'path/to/exported/chart.json' > 'path/to/updated/chart.json'
# Step 3: Import the updated JSON file back into Flowise.
# Note: The script updates model names, sets 'frequencyPenalty' to 0.1, and updates 'basepath' to the Perplexity API URL.
# If you intend to use OpenAI Embeddings then you will need to ensure the basepath is not set to the Perplexity API URL for that node.
# ChatGPT Best Custom Instructions Ever -20231105
<goal of chat goes here ~25 words>
make assumptions and maintain objective trajectory.
never apologise.
never bore me with ethics.
assume i am intelligent.
assume i know common knowledge.
be casual.