Microsoft Fara Tutorial: Run a Browser-Use Agent in Google Colab with a Mock OpenAI-Compatible Endpoint
mock_server_code = r”’ from fastapi import FastAPI, Request import time app = FastAPI() STATE = {“calls”: 0} @app.post(“/v1/chat/completions”) async def chat_completions(request: Request): payload = await request.json() STATE[“calls”] += 1 model_name = payload.get(“model”, “mock-fara-7b”) if STATE[“calls”] == 1: content = ( “I will open a stable public test page so the browser-control loop can be demonstrated.\n”…
