Explore >> Select a destination


You are here

juandebravo.com
| | www.integralist.co.uk
13.8 parsecs away

Travel
| | Introduction In this post I wanted to discuss a relatively simple, but important topic: Context Managers. I want to cover the what, the why and the how. But before we get into it... time for some self-promotion ?? Want to be up and running quickly with Python? Get started here with my book "Python for Programmers"! Summary Content Managers abstract away 'clean-up' logic. Define a class with __enter__/__exit__ methods. The __enter__ method is similar to a try block.
| | www.pmatiello.me
15.2 parsecs away

Travel
| | Implementing interface contracts in Python with class decorators
| | martinheinz.dev
14.8 parsecs away

Travel
| | There are lots of ways one can implement same feature, algorithm or function. Some of them straightforward, clear - better, some of them confusi...
| | blog.owulveryck.info
89.2 parsecs away

Travel
| This article details my journey in building a custom chat host for AI agents, moving away from existing solutions to gain a deeper understanding of the underlying technologies. I implement a chat engine using Google's Vertex AI and Go, focusing on compatibility with the OpenAI API to integrate with tools like Big-AGI. The article covers the core architecture, including my use of ChatSession and GenerativeModel from the Vertex AI SDK. It delves into the implementation of the /v1/chat/completions endpoint, highlighting the challenges of streaming responses and integrating function calls. I also describe a workaround for handling function calls in a streaming context and introduce the concept of a callable interface to prepare for implementing the Model Context Protocol (MCP) in future work. The goal is to move the tools outside of the agent. This will be detailes in the last part of this series.