Watch the breakdown here in a Q4 2024 prompt engineering update video
- Quick, natural language prompts for rapid prototyping
- Perfect for exploring model capabilities and behaviors
Watch the breakdown here in a Q4 2024 prompt engineering update video
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: |
Sequential prompt chaining in one method with context and output back-referencing.
main.py
- start here - full example using MinimalChainable
from chain.py
to build a sequential prompt chainchain.py
- contains zero library minimal prompt chain classchain_test.py
- tests for chain.py
, you can ignore thisrequirements.py
- python requirements//--------------------------------------------------------- | |
// 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 |