{ "cells": [ { "cell_type": "code", "execution_count": 3, "id": "fc00c2fa", "metadata": {}, "outputs": [], "source": [ "import dspy\n", "import os" ] }, { "cell_type": "code", "execution_count": null, "id": "3a1670ba", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "194bf39b", "metadata": {}, "outputs": [], "source": [ "gpt_5_mini = dspy.LM(\n", " model=\"openai/gpt-5-mini\",\n", " api_key=os.getenv(\"OPENAI_API_KEY\"),\n", " temperature=float(os.getenv(\"TEMPERATURE\", 1.0)),\n", " max_tokens= None,\n", " # max_completion_tokens=3000,\n", " cache=False\n", ")" ] }, { "cell_type": "code", "execution_count": 16, "id": "011b0ca4", "metadata": {}, "outputs": [], "source": [ "dspy.configure(lm= gpt_5_mini)\n", "\n", "session = dspy.Predict(\"question->code\")\n", "\n" ] }, { "cell_type": "code", "execution_count": 17, "id": "0217d501", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Prediction(\n", " code='Do you mean “what is a breakpoint” (in debugging) or are you asking about a specific command like “help breakpoint” in a debugger? Quick summary and examples:\\n\\n- What is a breakpoint?\\n - A breakpoint is a marker that tells the debugger to pause program execution at a specified line or function so you can inspect variables, call stack, and program state.\\n\\n- Common features\\n - Set/clear breakpoints, list them, enable/disable, conditional breakpoints (pause only when a condition is true), hit counts, and log-only breakpoints (print a message instead of pausing).\\n\\n- Examples\\n - gdb (C/C++):\\n - Set: break myfile.c:42 or break my_function\\n - List: info breakpoints\\n - Delete: delete 1\\n - Conditional: break myfile.c:42 if x==0\\n - Python (pdb):\\n - Set: b 42 or b MyClass.my_method\\n - List: b\\n - Disable: disable 1\\n - Clear: clear filename:lineno\\n - Chrome DevTools (JavaScript):\\n - Click the gutter next to a line to toggle a breakpoint.\\n - Right-click a breakpoint to make it conditional or edit its log message.\\n - You can also use the debugger; statement in code to cause a pause.\\n - Visual Studio:\\n - Click margin to toggle breakpoint, right-click to set conditions or actions.\\n\\n- Built-in help\\n - Many debuggers provide a help command: e.g. in gdb `help breakpoints` or in pdb `help break`.\\n\\nIf you meant something else (a specific tool, language, or the exact “help breakpoint” command), tell me which debugger or environment and I’ll give exact commands and usage.'\n", ")" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "session(question=\"Whta the help breakpoint\")" ] }, { "cell_type": "code", "execution_count": null, "id": "2bf84f7e", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.7" } }, "nbformat": 4, "nbformat_minor": 5 }