From eee0f3cfeb60957e7515a26e346b7afc762e288e Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Mon, 25 Nov 2024 16:53:03 +0800 Subject: [PATCH] chore: deleted accidently added file --- .../goldentests_chat__run_chat_golden_tests.snap.new | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 crates/tabby/tests/snapshots/goldentests_chat__run_chat_golden_tests.snap.new diff --git a/crates/tabby/tests/snapshots/goldentests_chat__run_chat_golden_tests.snap.new b/crates/tabby/tests/snapshots/goldentests_chat__run_chat_golden_tests.snap.new deleted file mode 100644 index ed775083e199..000000000000 --- a/crates/tabby/tests/snapshots/goldentests_chat__run_chat_golden_tests.snap.new +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: crates/tabby/tests/goldentests_chat.rs -assertion_line: 128 -expression: "golden_test(json!({\n \"seed\": 0, \"model\": \"default\", \"messages\":\n [{\n \"role\": \"user\", \"content\":\n \"How to convert a list of string to numbers in python\"\n }]\n})).await" ---- -" You can convert a list of strings to numbers in Python using the built-in `list()` function to convert the list of strings to a list of numbers, and then using the `int()` function to convert each element of the list to an integer. Here's an example:\n```\n# A list of strings\nnum_strings = ['1', '2', '3']\n\n# Convert the list of strings to a list of numbers\nnum_list = list(map(int, num_strings))\n\n# Print the list of numbers\nprint(num_list)\n```\nThis will output:\n```\n[1, 2, 3]\n```\nNote that this will only work if the strings represent integers. If the strings represent a different type of number, such as a decimal number, you will need to use a different function, such as `float()`, to convert them to a float.\n\nAlso, if you want to convert the string to a specific number type, you can use the built-in `int()` function and pass the number as an argument.\n\nFor example, to convert the string '123' to a float:\n```\nnum_string = '123'\nnum_float = float(num_string)\nprint(num_float)\n```\nThis will output:\n```\n123.0\n```\nAnd to convert the string '123' to a decimal:\n```\nnum_string = '123.45'\nnum_decimal = float(num_string)\nprint(num_decimal)\n```\nThis will output:\n```\n123.45\n```"