From abf2a3f05a71d85cd8a05bb32eec70569eca3688 Mon Sep 17 00:00:00 2001 From: Bastian Gruber Date: Tue, 24 Feb 2026 08:22:18 -0400 Subject: [PATCH] fix: change model, add CLAUDE file --- CLAUDE.md | 20 ++++++++++++++++++++ ai/ai.go | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..0b3ff40 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,20 @@ +# Caltrack + +## WHAT +- This is a calorie counter web application, written in Go +- It has a Terminal-like UI + +## WHY +- The idea of the app is to have a very simple, straight forward UI +- It should reduce looking up nutrition facts +- It should pre-calculate the activity level kcal and how much to consume to loose x amount of weight per week + +## HOW +- It is a web app/API written in Go +- It starts a http file server to serve the web/index.html file +- It is deployed on my own OVH VPS, behind a Caddy server which redirects calls to /caltrack/* +- It is served as a web frontend +- It has a API handlers to create and delete entries +- The API also provides handlers to get data for any given day +- It can store settings, like your weight, height, gender +- It uses Claude AI API calls to read human text and converts it into an API call to get nutrition facts out diff --git a/ai/ai.go b/ai/ai.go index 25a111d..e6bdca2 100644 --- a/ai/ai.go +++ b/ai/ai.go @@ -66,7 +66,7 @@ func (c *Client) EstimateCalories(ctx context.Context, description string, entry prompt := fmt.Sprintf("Estimate calories for this %s: %s", entryType, description) msg, err := client.Messages.New(ctx, anthropic.MessageNewParams{ - Model: "claude-haiku-4-5-20251001", + Model: "claude-sonnet-4-6", MaxTokens: 1024, System: []anthropic.TextBlockParam{ {Text: systemPrompt},