Skip to content

Commit d0b84af

Browse files
committed
fix: switch ui demo1 and demo2 from granite3.2 8b to 2b
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 32929fa commit d0b84af

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pdl-live-react/demos/demo1.pdl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
description: Simple LLM interaction
22
text:
33
- "write a hello world example, and explain to me how to run it"
4-
- model: ollama/granite3.2:8b
4+
- model: ollama/granite3.2:2b

pdl-live-react/demos/demo2.pdl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
description: Model chaining
22
text:
33
- "write a hello world example, and explain to me how to run it"
4-
- model: ollama/granite3.2
4+
- model: ollama/granite3.2:2b
55
parameters:
66
temperature: 0
77
- "how about in Rust?"
8-
- model: ollama/granite3.2
8+
- model: ollama/granite3.2:2b
99
parameters:
1010
temperature: 0

pdl-live-react/src/demos/demo1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"kind": "text", "id": "text", "pdl__timing": {"start_nanos": 1740765041590030000, "end_nanos": 1740765053690642000, "timezone": "EST"}, "description": "Simple LLM interaction", "defs": {}, "text": [{"kind": "data", "id": "text.0", "pdl__timing": {"start_nanos": 1740765041590070000, "end_nanos": 1740765041590631000, "timezone": "EST"}, "defs": {}, "data": "write a hello world example, and explain to me how to run it", "result": "write a hello world example, and explain to me how to run it"}, {"kind": "model", "id": "text.1.model", "context": [{"role": "user", "content": "write a hello world example, and explain to me how to run it", "defsite": "text.0"}], "pdl__timing": {"start_nanos": 1740765041631636000, "end_nanos": 1740765053690600000, "timezone": "EST"}, "defs": {}, "platform": "litellm", "model": "ollama/granite3.2:8b", "result": "Sure, here's a simple \"Hello, World!\" program in Python:\n\n```python\n# This is a simple Hello World program in Python\n\ndef main():\n print(\"Hello, World!\")\n\nif __name__ == \"__main__\":\n main()\n```\n\n### How to Run It:\n\n1. **Install Python**: Before you can run any Python code, you need to have Python installed on your computer. You can download it from the official Python website (https://www.python.org/downloads/). Make sure to select the version that matches your operating system during installation.\n\n2. **Create a new file**: Open a text editor like Notepad, Sublime Text, or Visual Studio Code and create a new file. Save this file with a `.py` extension, for example, `hello_world.py`.\n\n3. **Copy the code**: Copy and paste the above Python code into your newly created file.\n\n4. **Run the program**: Open your command prompt (Windows) or terminal (Mac/Linux), navigate to the directory where you saved your Python file using the `cd` command, then run it by typing `python hello_world.py` and pressing Enter. \n\nYou should see the text \"Hello, World!\" printed out in your terminal or command prompt window.\n\n### Explanation:\n\n- `# This is a simple Hello World program in Python`: This is a comment. In Python, anything after the `#` symbol on a line is ignored by the interpreter and is used for adding notes to your code.\n\n- `def main():`: This line defines a function named `main`. Functions are blocks of organized, reusable code that perform a single related action.\n\n- `print(\"Hello, World!\")`: This line tells Python to output the string \"Hello, World!\" to the console.\n\n- `if __name__ == \"__main__\": main()`: This is an idiom in Python used for testing whether a module is being run directly (not imported as part of another module). When you run this script directly, `__name__` will be `\"__main__\"`, so it calls the `main()` function. If this script was imported as a module from another script, `__name__` would be the name of that other script, and `main()` wouldn't be called automatically."}], "result": "write a hello world example, and explain to me how to run itSure, here's a simple \"Hello, World!\" program in Python:\n\n```python\n# This is a simple Hello World program in Python\n\ndef main():\n print(\"Hello, World!\")\n\nif __name__ == \"__main__\":\n main()\n```\n\n### How to Run It:\n\n1. **Install Python**: Before you can run any Python code, you need to have Python installed on your computer. You can download it from the official Python website (https://www.python.org/downloads/). Make sure to select the version that matches your operating system during installation.\n\n2. **Create a new file**: Open a text editor like Notepad, Sublime Text, or Visual Studio Code and create a new file. Save this file with a `.py` extension, for example, `hello_world.py`.\n\n3. **Copy the code**: Copy and paste the above Python code into your newly created file.\n\n4. **Run the program**: Open your command prompt (Windows) or terminal (Mac/Linux), navigate to the directory where you saved your Python file using the `cd` command, then run it by typing `python hello_world.py` and pressing Enter. \n\nYou should see the text \"Hello, World!\" printed out in your terminal or command prompt window.\n\n### Explanation:\n\n- `# This is a simple Hello World program in Python`: This is a comment. In Python, anything after the `#` symbol on a line is ignored by the interpreter and is used for adding notes to your code.\n\n- `def main():`: This line defines a function named `main`. Functions are blocks of organized, reusable code that perform a single related action.\n\n- `print(\"Hello, World!\")`: This line tells Python to output the string \"Hello, World!\" to the console.\n\n- `if __name__ == \"__main__\": main()`: This is an idiom in Python used for testing whether a module is being run directly (not imported as part of another module). When you run this script directly, `__name__` will be `\"__main__\"`, so it calls the `main()` function. If this script was imported as a module from another script, `__name__` would be the name of that other script, and `main()` wouldn't be called automatically."}
1+
{"kind": "text", "id": "text", "pdl__timing": {"start_nanos": 1740869444654606000, "end_nanos": 1740869453880846000, "timezone": "EST"}, "description": "Simple LLM interaction", "defs": {}, "text": [{"kind": "data", "id": "text.0", "pdl__timing": {"start_nanos": 1740869444654655000, "end_nanos": 1740869444655380000, "timezone": "EST"}, "defs": {}, "data": "write a hello world example, and explain to me how to run it", "result": "write a hello world example, and explain to me how to run it"}, {"kind": "model", "id": "text.1.model", "context": [{"role": "user", "content": "write a hello world example, and explain to me how to run it", "defsite": "text.0"}], "pdl__timing": {"start_nanos": 1740869444696695000, "end_nanos": 1740869453880775000, "timezone": "EST"}, "defs": {}, "platform": "litellm", "model": "ollama/granite3.2:2b", "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:\n1. `print()` is a built-in function in Python used to display output (text or values).\n2. The string `\"Hello, World!\"` is passed as an argument to this function. When executed, it will print \"Hello, World!\" to the console.\n\n**Running the Hello World Example:**\n\nTo run this Python code, follow these steps:\n\n1. **Install Python**: If you haven't already, download and install Python from the official website (https://www.python.org/downloads/). Make sure to select the option that includes the Python interpreter during installation.\n\n2. **Create a new file**: Open your preferred text editor or Integrated Development Environment (IDE) like Visual Studio Code, PyCharm, or even Notepad on Windows. Create a new file and save it with a `.py` extension, for example, `hello_world.py`.\n\n3. **Write the code**: Copy and paste the \"Hello, World!\" Python code into this newly created file.\n\n4. **Open a terminal/command prompt**: On Windows, press `Win + R`, type `cmd`, then press Enter to open Command Prompt. On macOS or Linux, use `Terminal`.\n\n5. **Navigate to your project directory**: In the command line, navigate to the folder where you saved `hello_world.py` using the `cd` (change directory) command. For example:\n\n ```\n cd path/to/your/project\n ```\n\n6. **Run the Python script**: Type `python hello_world.py` and press Enter. If everything is set up correctly, you should see \"Hello, World!\" printed in your terminal or command prompt.\n\nIf you encounter any issues, ensure that:\n- You've installed Python properly.\n- The file extension is `.py`.\n- Your working directory (the folder where `hello_world.py` resides) is correct and accessible from the command line.\n\nFor a more interactive environment without needing to open a terminal/command prompt, you can use an Integrated Development Environment (IDE). Popular Python IDEs include:\n\n- **Visual Studio Code**: Install the Python extension by Microsoft. You can then run your Python scripts directly within the editor using the built-in debugger and console.\n- **PyCharm**: A full-featured IDE from JetBrains, which supports Python development out of the box with features like code completion, debugging, and testing.\n- **Jupyter Notebook**: If you're interested in data science or scientific computing, Jupyter Notebooks provide an interactive environment where you can write and run Python code alongside text, images, and visualizations.\n\nTo run your \"Hello, World!\" script using these IDEs:\n1. Open the file `hello_world.py`.\n2. Click on a button (like Run or Debug) in the toolbar or use a keyboard shortcut to execute the Python code within the editor's environment.\n3. You should see \"Hello, World!\" printed in the output pane of your IDE."}], "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:\n1. `print()` is a built-in function in Python used to display output (text or values).\n2. The string `\"Hello, World!\"` is passed as an argument to this function. When executed, it will print \"Hello, World!\" to the console.\n\n**Running the Hello World Example:**\n\nTo run this Python code, follow these steps:\n\n1. **Install Python**: If you haven't already, download and install Python from the official website (https://www.python.org/downloads/). Make sure to select the option that includes the Python interpreter during installation.\n\n2. **Create a new file**: Open your preferred text editor or Integrated Development Environment (IDE) like Visual Studio Code, PyCharm, or even Notepad on Windows. Create a new file and save it with a `.py` extension, for example, `hello_world.py`.\n\n3. **Write the code**: Copy and paste the \"Hello, World!\" Python code into this newly created file.\n\n4. **Open a terminal/command prompt**: On Windows, press `Win + R`, type `cmd`, then press Enter to open Command Prompt. On macOS or Linux, use `Terminal`.\n\n5. **Navigate to your project directory**: In the command line, navigate to the folder where you saved `hello_world.py` using the `cd` (change directory) command. For example:\n\n ```\n cd path/to/your/project\n ```\n\n6. **Run the Python script**: Type `python hello_world.py` and press Enter. If everything is set up correctly, you should see \"Hello, World!\" printed in your terminal or command prompt.\n\nIf you encounter any issues, ensure that:\n- You've installed Python properly.\n- The file extension is `.py`.\n- Your working directory (the folder where `hello_world.py` resides) is correct and accessible from the command line.\n\nFor a more interactive environment without needing to open a terminal/command prompt, you can use an Integrated Development Environment (IDE). Popular Python IDEs include:\n\n- **Visual Studio Code**: Install the Python extension by Microsoft. You can then run your Python scripts directly within the editor using the built-in debugger and console.\n- **PyCharm**: A full-featured IDE from JetBrains, which supports Python development out of the box with features like code completion, debugging, and testing.\n- **Jupyter Notebook**: If you're interested in data science or scientific computing, Jupyter Notebooks provide an interactive environment where you can write and run Python code alongside text, images, and visualizations.\n\nTo run your \"Hello, World!\" script using these IDEs:\n1. Open the file `hello_world.py`.\n2. Click on a button (like Run or Debug) in the toolbar or use a keyboard shortcut to execute the Python code within the editor's environment.\n3. You should see \"Hello, World!\" printed in the output pane of your IDE."}

0 commit comments

Comments
 (0)