avatar

Ecstatic Disregard

Amateur Enantiodromist

Walks In Crete

A couple of weeks ago we headed off to Makrigialos on the south eastern coast of Crete. This is an excellent, relatively undeveloped resort, with plenty of amenities. I won’t go into detail except to mention the superb Splash Bar! Here however I want to mentions some walks we undertook over the course of those two weeks. From Makrigialos there are several within easy reach, either right on the doorstop or a short (< 1 hour) drive.

Using Spring AI with OpenAI

I’ve been experimenting with Spring AI to see how what it can do for Spring applications. Here is a simple demo that uses Spring AI, OpenAI and OpenWeather to look up weather conditions for a city using a natural language prompt. You can give it a query like What’s the weather like in Rome today? and it will return with a result, in JSON format, like this: {"main":{"temp":23.67,"feels_like":24.16,"temp_min":22.49,"temp_max":24.31,"pressure":1019, "humidity":79,"sea_level":1019,"grnd_level":992}, "weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"name":"Rome"} The code is here

Exeter's Weather via OpenAI's Chat Completion Tools

Today I experimented with hooking up a REST API to OpenAI via the Chat Completion “tool” framework (originally I had intended to use a Model Context Protocol server, but discovered that OpenAI’s integration for that was in a state of disarray…) Components: An OpenWeather api key An OpenAI platform api key A lambda that encapsulates calls to the weather api A python script that uses a “tool” definition to call the lambda The Lambda 🔗This is pretty straightforward: