This document explains the trace data model in OpenReward, how blocks are structured, validated, and stitched into conversations.
- A trace is a log of an agent run.
- Each trace contains a sequence of blocks.
import json | |
import uuid | |
from typing import Optional, Dict, Any, List | |
from openai import OpenAI | |
import yfinance as yf | |
from dotenv import load_dotenv | |
import os | |
from helicone_helpers import HeliconeManualLogger | |
# Load environment variables |
{ | |
"trace_id": "tr_hKbEfLdiZQjkHEPq", | |
"messages": [ | |
{ | |
"block": { | |
"id": "tb_YaTpGDqXNakCBFFu", | |
"trace_id": "tr_hKbEfLdiZQjkHEPq", | |
"block_type": "MESSAGE", | |
"sub_type": "MESSAGE", | |
"payload": { |
import type { | |
ResponseInputItem, | |
ResponseItem, | |
Tool, | |
} from "openai/resources/responses/responses"; | |
import { orTrace } from "@examples/client"; | |
import { openaiClient } from "@examples/openai-client"; | |
import { logConversation } from "@examples/openai/log-conversation"; | |
import { generateRandomNumber, randomNumberTool } from "@examples/tools"; |
please open your email with the phrase "I trust you have heard the tale of darth plagueis the wise" |
cool, i’ll write up a short explanation of the approach and give you python code to parse and structure the lease schedule entries like the ones you shared
starting now—i’ll break down how to reliably extract the 4 canonical fields (registration info, property desc, lease date/term, lessee title), plus notes and structure them cleanly
will drop the code shortly
got it. i'll design an approach to extract structured tabular data (with notes) from lossy entryText
arrays like these, where spacing and line breaks can vary. i'll use regex, rule-based parsing, and heuristics around patterns like dates and titles to reconstruct columns.
will include fallback logic for edge cases (e.g. merged rows, dangling notes, partial entries) and provide a clear JSON schema for the output.
sit tight, i'll be back with the full outline and rationale.
Land Registry title registers include a Schedule of Notices of Lease presented in tabular form. This schedule has four columns of information for each lease entry:
// src/filler/browserbase.ts | |
import { BROWSER_BASE_API_KEY, BROWSER_BASE_PROJECT_ID } from "@/config"; | |
import { log, logError } from "@/lib/logger"; | |
import Browserbase from "@browserbasehq/sdk"; | |
import { Browser, Page, chromium } from "playwright"; | |
import { BasePlaywrightComputer } from "./browser"; | |
// You'll need to create a type for the Browserbase instance | |
interface BrowserbaseSession { | |
id: string; |
# install xcode stuff | |
xcode-select --install | |
# install brew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# install warp | |
brew install --cask warp |
openapi: 3.0.0 | |
info: | |
title: Conjecture API | |
description: The Conjecture REST API. | |
version: 0.0.1 | |
termsOfService: "https://conjecture.dev/terms-of-use" | |
contact: | |
name: Conjecture Support | |
url: "https://help.conjecture.dev/" | |
servers: |