Views
No views yet
[!NOTE] ONLY text mode of Llama-4 supported for now!
llama-4-chat1<|begin_of_text|><|header_start|>system<|header_end|>
2
3{system_prompt}<|eot|><|header_start|>user<|header_end|>
4
5{user_message_1}<|eot|><|header_start|>assistant<|header_end|>
6
7{assistant_message_1}<|eot|><|header_start|>user<|header_end|>
8
9{user_message_2}<|eot|>
10<|header_start|>assistant<|header_end|>1<|begin_of_text|><|header_start|>system<|header_end|>
2
3You are a helpful assistant.<|eot|>
4<|header_start|>user<|header_end|>
5
6Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.
7
8Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.
9Do not use variables.
10
11[
12 {
13 "type": "function",
14 "function": {
15 "name": "get_current_weather",
16 "description": "Get the current weather in a given location",
17 "parameters": {
18 "type": "object",
19 "properties": {
20 "location": {
21 "type": "string",
22 "description": "The city and state, e.g. San Francisco, CA"
23 },
24 "unit": {
25 "type": "string",
26 "description": "The temperature unit to use. Infer this from the users location.",
27 "enum": [
28 "celsius",
29 "fahrenheit"
30 ]
31 }
32 },
33 "required": [
34 "location",
35 "unit"
36 ]
37 }
38 }
39 },
40 {
41 "type": "function",
42 "function": {
43 "name": "predict_weather",
44 "description": "Predict the weather in 24 hours",
45 "parameters": {
46 "type": "object",
47 "properties": {
48 "location": {
49 "type": "string",
50 "description": "The city and state, e.g. San Francisco, CA"
51 },
52 "unit": {
53 "type": "string",
54 "description": "The temperature unit to use. Infer this from the users location.",
55 "enum": [
56 "celsius",
57 "fahrenheit"
58 ]
59 }
60 },
61 "required": [
62 "location",
63 "unit"
64 ]
65 }
66 }
67 },
68 {
69 "type": "function",
70 "function": {
71 "name": "sum",
72 "description": "Calculate the sum of two numbers",
73 "parameters": {
74 "type": "object",
75 "properties": {
76 "a": {
77 "type": "integer",
78 "description": "the left hand side number"
79 },
80 "b": {
81 "type": "integer",
82 "description": "the right hand side number"
83 }
84 },
85 "required": [
86 "a",
87 "b"
88 ]
89 }
90 }
91 }
92]
93
94Question: How is the weather of Beijing, China in celsius?<|eot|><|header_start|>assistant<|header_end|>1<|begin_of_text|><|header_start|>system<|header_end|>
2
3You are a helpful assistant.<|eot|>
4<|header_start|>user<|header_end|>
5
6How is the weather of Beijing, China in celsius?<|eot|>
7<|header_start|>assistant<|header_end|>
8
9{"name":"get_current_weather","arguments":"{\"location\":\"Beijing, China\",\"unit\":\"celsius\"}"}<|eot|>
10<|header_start|>ipython<|header_end|>
11
12{"temperature":"30","unit":"celsius"}<|eot|><|header_start|>assistant<|header_end|>10M1wasmedge --dir .:. --nn-preload default:GGML:AUTO:Llama-4-Scout-17B-16E-Instruct-Q5_K_M.gguf \
2 llama-api-server.wasm \
3 --prompt-template llama-4-chat \
4 --ctx-size 1000000 \
5 --model-name Llama-4-Scout1wasmedge --dir .:. --nn-preload default:GGML:AUTO:Llama-4-Scout-17B-16E-Instruct-Q5_K_M.gguf \
2 llama-chat.wasm \
3 --prompt-template llama-4-chat \
4 --ctx-size 1000000