Skip to content

Commit 8329fad

Browse files
committed
fix: restore some ui functionality after pdl__result and pdl__model_input ast changes
Signed-off-by: Nick Mitchell <[email protected]>
1 parent f2f06be commit 8329fad

File tree

12 files changed

+35
-18
lines changed

12 files changed

+35
-18
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"kind": "text", "pdl__id": "text", "description": "Simple LLM interaction", "defs": {}, "text": [{"kind": "data", "pdl__id": "text.0", "defs": {}, "data": "write a hello world example, and explain to me how to run it", "pdl__result": "write a hello world example, and explain to me how to run it", "pdl__timing": {"start_nanos": 1742167736750671000, "end_nanos": 1742167736751205000, "timezone": "EDT"}, "pdl__is_leaf": true}, {"kind": "model", "pdl__id": "text.1.model", "context": [{"role": "user", "content": "write a hello world example, and explain to me how to run it", "defsite": "text.0"}], "defs": {}, "platform": "litellm", "model": "ollama_chat/granite3.2:2b", "input": "${ pdl_context }", "pdl__usage": {"completion_tokens": 458, "prompt_tokens": 24}, "pdl__result": "Sure, I'd be happy to help with that! Here's a simple \"Hello, World!\" program in Python, which is one of the most popular programming languages:\n\n```python\nprint(\"Hello, World!\")\n```\n\nTo run this code, follow these steps:\n\n1. **Install Python**: If you haven't already installed Python on your computer, download it from the official website (https://www.python.org/downloads/). Choose the latest version of Python 3 for Windows, macOS, or Linux. During installation, make sure to check the box that says \"Add Python to PATH\" (for Windows) or ensure that the correct interpreter is selected during setup (for macOS and Linux).\n\n2. **Open a Text Editor**: Use any text editor like Notepad (for Windows), TextEdit (for macOS), or Visual Studio Code, Sublime Text, Atom, etc. for writing your Python code.\n\n3. **Write the Code**: Copy and paste the following line into your text editor:\n\n ```python\n print(\"Hello, World!\")\n ```\n\n4. **Save the File**: Save this file with a `.py` extension, such as `hello_world.py`. For example, if you're using Notepad on Windows, save it as `hello_world.py`.\n\n5. **Open Command Prompt/Terminal**: On Windows, press `Win + R`, type `cmd`, and hit Enter. On macOS or Linux, open Terminal from the Applications > Utilities folder or by searching for \"Terminal\" in Spotlight.\n\n6. **Navigate to Your File's Location**: Use the `cd` command (for Command Prompt on Windows) or `cd` followed by your file path (for Terminal on macOS and Linux). For instance, if you saved the file in the Desktop folder:\n\n ```\n cd Desktop\n ```\n\n7. **Run the Python Script**: Type `python hello_world.py` (for Command Prompt on Windows) or `python3 hello_world.py` (for Terminal on macOS and Linux), then press Enter. You should see the output \"Hello, World!\" displayed in your terminal window.\n\nThat's it! You've just run a simple Python program. This example demonstrates how to print text using the built-in `print()` function.", "pdl__timing": {"start_nanos": 1742167736802952000, "end_nanos": 1742167744651433000, "timezone": "EDT"}, "pdl__is_leaf": true}], "pdl__result": "write a hello world example, and explain to me how to run itSure, I'd be happy to help with that! Here's a simple \"Hello, World!\" program in Python, which is one of the most popular programming languages:\n\n```python\nprint(\"Hello, World!\")\n```\n\nTo run this code, follow these steps:\n\n1. **Install Python**: If you haven't already installed Python on your computer, download it from the official website (https://www.python.org/downloads/). Choose the latest version of Python 3 for Windows, macOS, or Linux. During installation, make sure to check the box that says \"Add Python to PATH\" (for Windows) or ensure that the correct interpreter is selected during setup (for macOS and Linux).\n\n2. **Open a Text Editor**: Use any text editor like Notepad (for Windows), TextEdit (for macOS), or Visual Studio Code, Sublime Text, Atom, etc. for writing your Python code.\n\n3. **Write the Code**: Copy and paste the following line into your text editor:\n\n ```python\n print(\"Hello, World!\")\n ```\n\n4. **Save the File**: Save this file with a `.py` extension, such as `hello_world.py`. For example, if you're using Notepad on Windows, save it as `hello_world.py`.\n\n5. **Open Command Prompt/Terminal**: On Windows, press `Win + R`, type `cmd`, and hit Enter. On macOS or Linux, open Terminal from the Applications > Utilities folder or by searching for \"Terminal\" in Spotlight.\n\n6. **Navigate to Your File's Location**: Use the `cd` command (for Command Prompt on Windows) or `cd` followed by your file path (for Terminal on macOS and Linux). For instance, if you saved the file in the Desktop folder:\n\n ```\n cd Desktop\n ```\n\n7. **Run the Python Script**: Type `python hello_world.py` (for Command Prompt on Windows) or `python3 hello_world.py` (for Terminal on macOS and Linux), then press Enter. You should see the output \"Hello, World!\" displayed in your terminal window.\n\nThat's it! You've just run a simple Python program. This example demonstrates how to print text using the built-in `print()` function.", "pdl__timing": {"start_nanos": 1742167736750625000, "end_nanos": 1742167744651487000, "timezone": "EDT"}, "pdl__is_leaf": false}
1+
{"kind": "text", "pdl__id": "text", "description": "Simple LLM interaction", "defs": {}, "text": [{"kind": "data", "pdl__id": "text.0", "defs": {}, "data": {"expr": "write a hello world example, and explain to me how to run it", "pdl__result": "write a hello world example, and explain to me how to run it"}, "pdl__result": "write a hello world example, and explain to me how to run it", "pdl__timing": {"start_nanos": 1742301779426641000, "end_nanos": 1742301779427310000, "timezone": "EDT"}, "pdl__is_leaf": true}, {"kind": "model", "pdl__id": "text.1.model", "context": [{"role": "user", "content": "write a hello world example, and explain to me how to run it", "defsite": "text.0"}], "defs": {}, "platform": "litellm", "model": {"expr": "ollama_chat/granite3.2:2b", "pdl__result": "ollama_chat/granite3.2:2b"}, "input": {"kind": "data", "pdl__id": "text.1.model", "defs": {}, "data": {"expr": "${ pdl_context }", "pdl__result": [{"role": "user", "content": "write a hello world example, and explain to me how to run it", "defsite": "text.0"}]}, "pdl__result": "[{\"role\": \"user\", \"content\": \"write a hello world example, and explain to me how to run it\", \"defsite\": \"text.0\"}]", "pdl__timing": {"start_nanos": 1742301779480586000, "end_nanos": 1742301779481042000, "timezone": "EDT"}, "pdl__is_leaf": true}, "parameters": {"expr": null}, "pdl__usage": {"completion_tokens": 513, "prompt_tokens": 24}, "pdl__model_input": [{"role": "user", "content": "write a hello world example, and explain to me how to run it", "defsite": "text.0"}], "pdl__result": "**Hello World Example in Python**\n\nHere's a simple \"Hello, World!\" program written in Python:\n\n```python\nprint(\"Hello, World!\")\n```\n\nThis code does the following:\n- `print()` is a built-in function in Python used to output data.\n- The string `\"Hello, World!\"` is the message that will be printed when you run this program.\n\n**Steps to Run the \"Hello World\" Program:**\n\n1. **Create or Open a Text Editor**: You can use any text editor like Notepad (notepad.exe on Windows), Sublime Text, Visual Studio Code, Atom, or even an online Python compiler. For this example, let's use an online Python compiler like Repl.it.\n\n - Go to https://repl.it/languages/python3\n\n2. **Write the Code**:\n - In the editor, you'll see a text area where you can write your code.\n - Copy and paste or type the following code:\n\n ```python\n print(\"Hello, World!\")\n ```\n\n3. **Save Your File (Optional but Recommended)**: If you're using an online compiler like Repl.it, you don't need to save files locally. However, for local text editors, remember to save your file with a `.py` extension before running it.\n\n4. **Run the Code**:\n\n - For Repl.it:\n - Click on \"Run\" or press `Ctrl + Enter` (Windows/Linux) or `Cmd + Enter` (Mac). The output will appear in the console at the bottom of the page, showing:\n ```\n Hello, World!\n ```\n\n - **For Local Python Installation**:\n - Open your terminal or command prompt.\n - Navigate to the directory where you saved your `.py` file using the `cd` command (e.g., `cd /path/to/your/file`).\n - Run the script by typing `python filename.py` and press Enter. Replace `filename` with the name of your Python file. You should see the output in the terminal:\n ```\n Hello, World!\n ```\n\n5. **Verify the Output**: Check if you've seen the printed message \"Hello, World!\" on your screen or console. If so, congratulations! Your first Python program has run successfully.\n\nThat's it! You've just written and executed a simple \"Hello, World!\" program in Python. Now you're ready to dive into more complex projects with this fundamental tool at your fingertips.", "pdl__timing": {"start_nanos": 1742301779480415000, "end_nanos": 1742301787251983000, "timezone": "EDT"}, "pdl__is_leaf": true}], "pdl__result": "write a hello world example, and explain to me how to run it**Hello World Example in Python**\n\nHere's a simple \"Hello, World!\" program written in Python:\n\n```python\nprint(\"Hello, World!\")\n```\n\nThis code does the following:\n- `print()` is a built-in function in Python used to output data.\n- The string `\"Hello, World!\"` is the message that will be printed when you run this program.\n\n**Steps to Run the \"Hello World\" Program:**\n\n1. **Create or Open a Text Editor**: You can use any text editor like Notepad (notepad.exe on Windows), Sublime Text, Visual Studio Code, Atom, or even an online Python compiler. For this example, let's use an online Python compiler like Repl.it.\n\n - Go to https://repl.it/languages/python3\n\n2. **Write the Code**:\n - In the editor, you'll see a text area where you can write your code.\n - Copy and paste or type the following code:\n\n ```python\n print(\"Hello, World!\")\n ```\n\n3. **Save Your File (Optional but Recommended)**: If you're using an online compiler like Repl.it, you don't need to save files locally. However, for local text editors, remember to save your file with a `.py` extension before running it.\n\n4. **Run the Code**:\n\n - For Repl.it:\n - Click on \"Run\" or press `Ctrl + Enter` (Windows/Linux) or `Cmd + Enter` (Mac). The output will appear in the console at the bottom of the page, showing:\n ```\n Hello, World!\n ```\n\n - **For Local Python Installation**:\n - Open your terminal or command prompt.\n - Navigate to the directory where you saved your `.py` file using the `cd` command (e.g., `cd /path/to/your/file`).\n - Run the script by typing `python filename.py` and press Enter. Replace `filename` with the name of your Python file. You should see the output in the terminal:\n ```\n Hello, World!\n ```\n\n5. **Verify the Output**: Check if you've seen the printed message \"Hello, World!\" on your screen or console. If so, congratulations! Your first Python program has run successfully.\n\nThat's it! You've just written and executed a simple \"Hello, World!\" program in Python. Now you're ready to dive into more complex projects with this fundamental tool at your fingertips.", "pdl__timing": {"start_nanos": 1742301779426567000, "end_nanos": 1742301787252033000, "timezone": "EDT"}, "pdl__is_leaf": false}

0 commit comments

Comments
 (0)