Skip to content

Instantly share code, notes, and snippets.

View danclaytondev's full-sized avatar

Dan Clayton danclaytondev

View GitHub Profile
@danclaytondev
danclaytondev / debugging.md
Created December 9, 2024 16:54
Testing Ollama v0.5 to see if JSON format is injected into Promt

Testing the new structured output format example from Ollama v0.5 blog post

I wanted to see if the JSON schema in the new Ollama stuctured outputs was injected into the prompt to help the model output valid JSON. It doesn't look like it is.

OLLAMA_DEBUG=1 ollama serve

New shell

curl -X POST http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{
@danclaytondev
danclaytondev / nextstage.php
Last active May 7, 2021 13:54
Laravel Workflows using models
<?php
// This isn't quite the same as the production code, but I wanted to be clear in this demo!
class LoanApplication extends Model
{
public function getNextStage() ?WorkflowStage
{
$nextSequence = $this->workflow->sequences()
->where('sequence_number', $this->current_sequence_number + 1)