@j-o-r/hello-dave 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +337 -68
  3. package/README.md.bak +523 -0
  4. package/README.md.bak.1774780058 +338 -0
  5. package/README.md.bak2 +531 -0
  6. package/bin/dave.js +33 -22
  7. package/bin/spawn_agent.js +293 -0
  8. package/docs.bak.1774780058/agent-manager.md +167 -0
  9. package/docs.bak.1774780058/agent-manager.md.bak +137 -0
  10. package/docs.bak.1774780058/agent-manager.md.bak2 +157 -0
  11. package/docs.bak.1774780058/codeserver-pattern.md +191 -0
  12. package/docs.bak.1774780058/path-resolution-best-practices.md +104 -0
  13. package/docs.bak.1774780058/project-overview.md +67 -0
  14. package/docs.bak.1774780058/project-overview.md.bak +67 -0
  15. package/docs.bak.1774780058/prompt-class.md +141 -0
  16. package/docs.bak.1774780058/prompt-class.md.bak +142 -0
  17. package/docs.bak.1774780058/tools-syntax-validation.md +121 -0
  18. package/docs.bak.1774780058/tools-syntax-validation.md.bak2 +125 -0
  19. package/docs.bak.1774780058/tools-syntax-validation.md.bak3 +125 -0
  20. package/docs.bak.1774780058/tools-syntax-validation.md.bak4 +106 -0
  21. package/docs.bak.1774780058/tools-syntax-validation.md.bak_path +106 -0
  22. package/docs.bak.1774780058/toolset.md +164 -0
  23. package/docs.bak.1774780058/toolset.md.bak +94 -0
  24. package/docs.bak.1774780058/toolset.md.bak3 +161 -0
  25. package/docs.bak.1774780058/toolset.md.bak4 +161 -0
  26. package/docs.bak.1774780058/toolset.md.bak5 +161 -0
  27. package/docs.bak.1774780058/toolset.md.bak6 +163 -0
  28. package/docs.bak.1774780058/toolset.md.bak_path +163 -0
  29. package/docs.bak.1774780058/toolset.md.bak_syntax +161 -0
  30. package/docs.bak.1774780058/xai-responses.md +111 -0
  31. package/docs.bak.1774780058/xai-responses.md.bak +107 -0
  32. package/docs.bak.1774780058/xai-responses.md.bak2 +107 -0
  33. package/docs.bak.1774780058/xai_collections.md +106 -0
  34. package/examples/ask_agent.js +137 -0
  35. package/examples/code_agent.js +149 -0
  36. package/examples/codeserver.sh +47 -0
  37. package/examples/daisy_agent.js +170 -0
  38. package/examples/docs_agent.js +148 -0
  39. package/examples/gpt_agent.js +122 -0
  40. package/examples/grok_agent.js +132 -0
  41. package/examples/memory_agent.js +152 -0
  42. package/examples/npm_agent.js +202 -0
  43. package/examples/prompt_agent.js +133 -0
  44. package/examples/readme_agent.js +148 -0
  45. package/examples/test_agent.js +187 -0
  46. package/examples/todo_agent.js +175 -0
  47. package/{examples/codeDave.js → examples.bak.1774780058/code_agent.js} +40 -6
  48. package/{examples/CodeServer → examples.bak.1774780058/codeserver.sh} +9 -5
  49. package/examples.bak.1774780058/memory_agent.js +112 -0
  50. package/{examples/spawndave.js → examples.bak.1774780058/spawn_agent.js} +29 -6
  51. package/examples.bak.1774780058/test_agent.js +162 -0
  52. package/{examples/todoDave.js → examples.bak.1774780058/todo_agent.js} +8 -2
  53. package/lib/API/x.ai/responses.js +7 -9
  54. package/lib/AgentManager.js +3 -2
  55. package/lib/AgentServer.js +23 -19
  56. package/lib/ToolSet.js +4 -1
  57. package/lib/genericToolset.js +159 -26
  58. package/lib/genericToolset.js.bak_syntax +402 -0
  59. package/lib/index.js +5 -1
  60. package/lib/wsCli.js +0 -1
  61. package/package.json +5 -6
  62. package/scenarios.bak.1774780058/data/eval_node_message.json +9 -0
  63. package/scenarios.bak.1774780058/data/hist_oa.json +66 -0
  64. package/scenarios.bak.1774780058/data/o3_response1.json +96 -0
  65. package/scenarios.bak.1774780058/data/oa_reasoning_parse.json +112 -0
  66. package/scenarios.bak.1774780058/data/tool_oa.json +96 -0
  67. package/scenarios.bak.1774780058/data/tool_xai.json +59 -0
  68. package/scenarios.bak.1774780058/data/tool_xai2.json +40 -0
  69. package/scenarios.bak.1774780058/data/xai-response-1.json +59 -0
  70. package/scenarios.bak.1774780058/data/xai-response-2.json +10 -0
  71. package/scenarios.bak.1774780058/data/xai_reasoning_tools_resp.json +59 -0
  72. package/scenarios.bak.1774780058/data/xai_search_response.json +58 -0
  73. package/scenarios.bak.1774780058/environment.js +10 -0
  74. package/scenarios.bak.1774780058/example.js +17 -0
  75. package/scenarios.bak.1774780058/genericToolset.test.js +182 -0
  76. package/scenarios.bak.1774780058/grok.js +113 -0
  77. package/scenarios.bak.1774780058/memory-tools.js +51 -0
  78. package/scenarios.bak.1774780058/openai-o3.js +137 -0
  79. package/scenarios.bak.1774780058/openai-prompt.js +155 -0
  80. package/scenarios.bak.1774780058/openai-session.js +148 -0
  81. package/scenarios.bak.1774780058/openai.js +102 -0
  82. package/scenarios.bak.1774780058/prompt.js +118 -0
  83. package/scenarios.bak.1774780058/promptFishbowl.js +76 -0
  84. package/scenarios.bak.1774780058/search.brave.com.js +25 -0
  85. package/scenarios.bak.1774780058/sh.js +15 -0
  86. package/scenarios.bak.1774780058/test-wsio.js +26 -0
  87. package/scenarios.bak.1774780058/testToolset.js +42 -0
  88. package/scenarios.bak.1774780058/toolset.js +16 -0
  89. package/scenarios.bak.1774780058/toolset.test.js +141 -0
  90. package/scenarios.bak.1774780058/write_file_syntax.test.js +145 -0
  91. package/scenarios.bak.1774780058/write_file_validation/README.md +30 -0
  92. package/scenarios.bak.1774780058/write_file_validation/bad.js +3 -0
  93. package/scenarios.bak.1774780058/write_file_validation/good.js +4 -0
  94. package/scenarios.bak.1774780058/write_file_validation/test.sh +43 -0
  95. package/scenarios.bak.1774780058/wsClient.js +69 -0
  96. package/scenarios.bak.1774780058/xai_responses.integration.test.js +57 -0
  97. package/scenarios.bak.1774780058/xai_responses.test.js +154 -0
  98. package/scenarios.bak.1774780058/xaicoll.js +50 -0
  99. package/scenarios.bak.1774780058/xaifiles.js +48 -0
  100. package/types/AgentManager.d.ts +4 -3
  101. package/types/index.d.ts +3 -1
  102. package/utils/syntax_check.sh +61 -0
  103. package/utils/test.sh +46 -0
  104. /package/{examples/askDave.js → examples.bak.1774780058/ask_agent.js} +0 -0
  105. /package/{examples/coderev.js → examples.bak.1774780058/coderev_agent.js} +0 -0
  106. /package/{examples/daisy.js → examples.bak.1774780058/daisy_agent.js} +0 -0
  107. /package/{examples/docsDave.js → examples.bak.1774780058/docs_agent.js} +0 -0
  108. /package/{examples/gpt.js → examples.bak.1774780058/gpt_agent.js} +0 -0
  109. /package/{examples/grok.js → examples.bak.1774780058/grok_agent.js} +0 -0
  110. /package/{examples/npmDave.js → examples.bak.1774780058/npm_agent.js} +0 -0
  111. /package/{examples/promptDave.js → examples.bak.1774780058/prompt_agent.js} +0 -0
  112. /package/{examples/readmeDave.js → examples.bak.1774780058/readme_agent.js} +0 -0
@@ -0,0 +1,9 @@
1
+ {
2
+ "type": "function_request",
3
+ "function_request": {
4
+ "name": "execute_javascript",
5
+ "id": "fc_686284be7fec81a0af404739ec17e29f09dcb726e1aa6681",
6
+ "call_id": "call_w0WnYfQiqFey5UiF4jG0XQcn",
7
+ "parameters": "{\"script\": \"/*\\n * Function: parseMessages\\n * Description: Parses the 'response' object and adds messages to the given Prompt instance.\\n * The function supports two types of response items:\\n * 1. function_call: These are mapped to a function_request message with role 'assistant'.\\n * The function_request content fields are: name, id, call_id, and parameters (from arguments).\\n * 2. message: These are mapped to text messages. In case the content array contains items with type 'output_text',\\n * they are converted into PRTextMessage objects (i.e., with type \\\"text\\\") and added to the prompt.\\n * In the case where there is more than one piece of content, addMultiModal is used.\\n *\\n * Note: This function assumes that the response is already parsed (i.e., a JS object) and that prompt is an instance\\n * of the Prompt class imported from lib/Prompt.js.\\n */\\n\\nexport function parseMessages(response, prompt) {\\n if (!response || !Array.isArray(response.output)) {\\n console.warn('Invalid response format. Expected an object with an output array.');\\n return;\\n }\\n\\n response.output.forEach(item => {\\n if (item.type === 'function_call') {\\n // Convert function_call to a function_request message\\n const functionRequestContent = {\\n type: 'function_request',\\n function_request: {\\n id: item.id,\\n name: item.name,\\n call_id: item.call_id,\\n parameters: item.arguments\\n }\\n };\\n // Add as a multi-modal assistant message\\n try {\\n prompt.addMultiModal('assistant', [functionRequestContent]);\\n } catch (err) {\\n console.error('Error adding function_request message:', err);\\n }\\n } else if (item.type === 'message') {\\n // Determine the role; if not provided, use 'assistant' by default\\n const role = item.role || 'assistant';\\n let prContents = [];\\n\\n if (Array.isArray(item.content)) {\\n item.content.forEach(contentItem => {\\n if (contentItem.type === 'output_text') {\\n prContents.push({\\n type: 'text',\\n text: contentItem.text\\n });\\n } else if (contentItem.type === 'image_url') {\\n prContents.push({\\n type: 'image_url',\\n image_url: contentItem.image_url\\n });\\n } else {\\n // If another type is encountered, you may want to add additional handling here.\\n console.warn('Unhandled content type in message:', contentItem.type);\\n }\\n });\\n }\\n\\n if (prContents.length > 0) {\\n try {\\n // If there is only one text message and no multi-modal requirements, use add\\n if (prContents.length === 1 && prContents[0].type === 'text') {\\n prompt.add(role, prContents[0].text);\\n } else {\\n prompt.addMultiModal(role, prContents);\\n }\\n } catch (err) {\\n console.error('Error adding message:', err);\\n }\\n }\\n } else {\\n console.warn('Unhandled item type:', item.type);\\n }\\n });\\n}\\n\\n// Example usage:\\n// import Prompt from './lib/Prompt.js';\\n// import { parseMessages } from './parseMessages.js';\\n// \\n// const prompt = new Prompt(1000);\\n// const response = {\\n// output: [\\n// {\\n// id: 'fc_68624cb486148191b2078ec2a76e389a068902ce013ce130',\\n// type: 'function_call',\\n// status: 'completed',\\n// arguments: '{}',\\n// call_id: 'call_6YNYwCZRbmMPr5WaEo1FkbXx',\\n// name: 'get_date_time'\\n// },\\n// {\\n// id: 'msg_68624cb7c28c8191aff3106ebea965d4068902ce013ce130',\\n// type: 'message',\\n// status: 'completed',\\n// content: [\\n// {\\n// type: 'output_text',\\n// annotations: [],\\n// logprobs: [],\\n// text: 'Today is Friday, 12 May 2025. The current weather in Amsterdam, The Netherlands is 24°C.'\\n// }\\n// ],\\n// role: 'assistant'\\n// }\\n// ]\\n// };\\n// \\n// parseMessages(response, prompt);\\n// console.log(prompt.messages);\\n\"}"
8
+ }
9
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "background": false,
3
+ "include": null,
4
+ "input": [
5
+ {
6
+ "role": "user",
7
+ "content": [
8
+ {
9
+ "type": "input_text",
10
+ "text": "What is your task?"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "role": "assistant",
16
+ "content": [
17
+ {
18
+ "type": "output_text",
19
+ "text": "My task is to assist with administrative duties, such as answering questions, scheduling, providing information, and supporting office operations efficiently."
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "role": "user",
25
+ "content": [
26
+ {
27
+ "type": "input_text",
28
+ "text": "What day is today and what is the weather forcast in Amsterdam, The Netherlands"
29
+ }
30
+ ]
31
+ }
32
+ ],
33
+ "instructions": "You are an assistant for an administrative office. Respond precise and concise",
34
+ "max_output_tokens": 4000,
35
+ "model": "gpt-4.1",
36
+ "store": false,
37
+ "tool_choice": "auto",
38
+ "tools": [
39
+ {
40
+ "type": "function",
41
+ "name": "get_current_weather",
42
+ "description": "Get the current weather in a given location",
43
+ "parameters": {
44
+ "type": "object",
45
+ "properties": {
46
+ "location": {
47
+ "type": "string",
48
+ "description": "The city and country"
49
+ }
50
+ },
51
+ "required": [
52
+ "location"
53
+ ]
54
+ }
55
+ },
56
+ {
57
+ "type": "function",
58
+ "name": "get_date_time",
59
+ "description": "Get the current date and time",
60
+ "parameters": {
61
+ "type": "object",
62
+ "properties": {}
63
+ }
64
+ }
65
+ ]
66
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "status": 200,
3
+ "responseType": "js",
4
+ "response": {
5
+ "id": "resp_6874b24814cc819ea71f8eb6e91232ca02f4bf761199143a",
6
+ "object": "response",
7
+ "created_at": 1752478280,
8
+ "status": "completed",
9
+ "background": false,
10
+ "error": null,
11
+ "incomplete_details": null,
12
+ "instructions": "Respond precise and concise",
13
+ "max_output_tokens": null,
14
+ "max_tool_calls": 10,
15
+ "model": "gpt-4.1-2025-04-14",
16
+ "output": [
17
+ {
18
+ "id": "fc_6874b24891c0819e9062bad90155a54c02f4bf761199143a",
19
+ "type": "function_call",
20
+ "status": "completed",
21
+ "arguments": "{}",
22
+ "call_id": "call_VxiUGAEYYi6vIB2Pvii7BjfC",
23
+ "name": "get_date_time"
24
+ },
25
+ {
26
+ "id": "fc_6874b248a410819ea277914240709c9d02f4bf761199143a",
27
+ "type": "function_call",
28
+ "status": "completed",
29
+ "arguments": "{\"location\":\"Amsterdam, The Netherlands\"}",
30
+ "call_id": "call_4R7UXEUNHODywjbuqCvtoj0K",
31
+ "name": "get_current_weather"
32
+ }
33
+ ],
34
+ "parallel_tool_calls": true,
35
+ "previous_response_id": null,
36
+ "reasoning": {
37
+ "effort": null,
38
+ "summary": null
39
+ },
40
+ "service_tier": "default",
41
+ "store": true,
42
+ "temperature": 1,
43
+ "text": {
44
+ "format": {
45
+ "type": "text"
46
+ }
47
+ },
48
+ "tool_choice": "auto",
49
+ "tools": [
50
+ {
51
+ "type": "function",
52
+ "description": "Get the current weather in a given location",
53
+ "name": "get_current_weather",
54
+ "parameters": {
55
+ "type": "object",
56
+ "properties": {
57
+ "location": {
58
+ "type": "string",
59
+ "description": "The city and country"
60
+ }
61
+ },
62
+ "required": [
63
+ "location"
64
+ ]
65
+ },
66
+ "strict": true
67
+ },
68
+ {
69
+ "type": "function",
70
+ "description": "Get the current date and time",
71
+ "name": "get_date_time",
72
+ "parameters": {
73
+ "type": "object",
74
+ "properties": {}
75
+ },
76
+ "strict": true
77
+ }
78
+ ],
79
+ "top_logprobs": 0,
80
+ "top_p": 1,
81
+ "truncation": "disabled",
82
+ "usage": {
83
+ "input_tokens": 86,
84
+ "input_tokens_details": {
85
+ "cached_tokens": 0
86
+ },
87
+ "output_tokens": 46,
88
+ "output_tokens_details": {
89
+ "reasoning_tokens": 0
90
+ },
91
+ "total_tokens": 132
92
+ },
93
+ "user": null,
94
+ "metadata": {}
95
+ }
96
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "status": 200,
3
+ "responseType": "js",
4
+ "response": {
5
+ "id": "resp_6863d9370ab48192b83fae94e9782ecd0019502d0d1a63e8",
6
+ "object": "response",
7
+ "created_at": 1751374135,
8
+ "status": "completed",
9
+ "background": false,
10
+ "error": null,
11
+ "incomplete_details": null,
12
+ "instructions": "You are Dave, an assistant for this project, which is a Node.js 22 / JavaScript ESM ES2022 project with minimal external dependencies. Comments are in JSDoc format.\n\nThe goal is to create a multi-endpoint API for AI models and system integration that can be easily tested with a CLI interface and utilized in other projects.\n\nBe helpful, but keep responses brief and concise. User input may include new questions, remarks about previous conversations, or opinions on past answers.\n\nAsk a clarifying question to establish context before providing an answer when necessary, and reason explicitly before reaching a conclusion.",
13
+ "max_output_tokens": 4000,
14
+ "max_tool_calls": null,
15
+ "model": "o3-mini-2025-01-31",
16
+ "output": [
17
+ {
18
+ "id": "rs_6863d938a7008192bfd00349682585390019502d0d1a63e8",
19
+ "type": "reasoning",
20
+ "summary": [
21
+ {
22
+ "type": "summary_text",
23
+ "text": "**Defining core functionalities**\n\nI need to outline core functionalities, focusing on aspects like multi-endpoint API, AI integration, and CLI testing. Each functionality should be described clearly and concisely. For the multi-endpoint API, I might explain its role in allowing different interfaces to interact efficiently. Regarding AI integration, I can highlight how it enhances automation and data processing. Finally, for CLI testing, I'll emphasize enabling user interaction through the command line, streamlining testing processes. I'll ensure the explanations are specific yet straightforward."
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ "id": "msg_6863d93a45508192919451d43bb4462b0019502d0d1a63e8",
29
+ "type": "message",
30
+ "status": "completed",
31
+ "content": [
32
+ {
33
+ "type": "output_text",
34
+ "annotations": [],
35
+ "logprobs": [],
36
+ "text": "The project's core functionalities include:\n\n1. Multiple API endpoints that support various AI model integrations.\n2. A command-line interface for testing and interacting with the endpoints.\n3. System integration capabilities, making it adaptable for deployment in other projects.\n4. Minimal external dependencies, leveraging Node.js 22 and modern JavaScript (ES2022).\n5. A modular design that allows for easy extension of both API and CLI functionalities.\n\nLet me know if you'd like more details on any specific functionality."
37
+ }
38
+ ],
39
+ "role": "assistant"
40
+ }
41
+ ],
42
+ "parallel_tool_calls": true,
43
+ "previous_response_id": null,
44
+ "reasoning": {
45
+ "effort": "low",
46
+ "summary": "detailed"
47
+ },
48
+ "service_tier": "default",
49
+ "store": false,
50
+ "temperature": 1,
51
+ "text": {
52
+ "format": {
53
+ "type": "text"
54
+ }
55
+ },
56
+ "tool_choice": "auto",
57
+ "tools": [
58
+ {
59
+ "type": "function",
60
+ "description": "Execute a Bash command on Ubuntu 25.04 x86_64GNU/Linux and with xdg-open ,msmtp ,node ,curl.",
61
+ "name": "execute_bash",
62
+ "parameters": {
63
+ "type": "object",
64
+ "properties": {
65
+ "command": {
66
+ "type": "string",
67
+ "description": "The bash command."
68
+ }
69
+ },
70
+ "required": [
71
+ "command"
72
+ ]
73
+ },
74
+ "strict": true
75
+ },
76
+ {
77
+ "type": "function",
78
+ "description": "Execute ESM ES6 javascript on `node`.",
79
+ "name": "execute_javascript",
80
+ "parameters": {
81
+ "type": "object",
82
+ "properties": {
83
+ "script": {
84
+ "type": "string",
85
+ "description": "ES6 ESM Javascript to execute"
86
+ }
87
+ },
88
+ "required": [
89
+ "script"
90
+ ]
91
+ },
92
+ "strict": true
93
+ }
94
+ ],
95
+ "top_logprobs": 0,
96
+ "top_p": 1,
97
+ "truncation": "disabled",
98
+ "usage": {
99
+ "input_tokens": 321,
100
+ "input_tokens_details": {
101
+ "cached_tokens": 0
102
+ },
103
+ "output_tokens": 99,
104
+ "output_tokens_details": {
105
+ "reasoning_tokens": 0
106
+ },
107
+ "total_tokens": 420
108
+ },
109
+ "user": null,
110
+ "metadata": {}
111
+ }
112
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "status": 200,
3
+ "response": {
4
+ "id": "resp_685d593c2be081a3aead008d73a85ccb0c3ba89bbd579f4c",
5
+ "object": "response",
6
+ "created_at": 1750948156,
7
+ "status": "completed",
8
+ "background": false,
9
+ "error": null,
10
+ "incomplete_details": null,
11
+ "instructions": "You are an assistant for an administrative office. Respond precise and concise",
12
+ "max_output_tokens": 4000,
13
+ "max_tool_calls": null,
14
+ "model": "gpt-4.1-2025-04-14",
15
+ "output": [
16
+ {
17
+ "id": "fc_685d593ccbec81a3a82ce22587b0ea1f0c3ba89bbd579f4c",
18
+ "type": "function_call",
19
+ "status": "completed",
20
+ "arguments": "{}",
21
+ "call_id": "call_at1hBqHlVOXWvjs2d2KZnY6n",
22
+ "name": "get_date_time"
23
+ },
24
+ {
25
+ "id": "fc_685d593ce3dc81a3a78b88ed1f9c80d50c3ba89bbd579f4c",
26
+ "type": "function_call",
27
+ "status": "completed",
28
+ "arguments": "{\"location\":\"Amsterdam, The Netherlands\"}",
29
+ "call_id": "call_e233mDWoMkYk1uwbaHj4T9kF",
30
+ "name": "get_current_weather"
31
+ }
32
+ ],
33
+ "parallel_tool_calls": true,
34
+ "previous_response_id": null,
35
+ "reasoning": {
36
+ "effort": null,
37
+ "summary": null
38
+ },
39
+ "service_tier": "default",
40
+ "store": false,
41
+ "temperature": 1,
42
+ "text": {
43
+ "format": {
44
+ "type": "text"
45
+ }
46
+ },
47
+ "tool_choice": "auto",
48
+ "tools": [
49
+ {
50
+ "type": "function",
51
+ "description": "Get the current weather in a given location",
52
+ "name": "get_current_weather",
53
+ "parameters": {
54
+ "type": "object",
55
+ "properties": {
56
+ "location": {
57
+ "type": "string",
58
+ "description": "The city and country"
59
+ }
60
+ },
61
+ "required": [
62
+ "location"
63
+ ]
64
+ },
65
+ "strict": true
66
+ },
67
+ {
68
+ "type": "function",
69
+ "description": "Get the current date and time",
70
+ "name": "get_date_time",
71
+ "parameters": {
72
+ "type": "object",
73
+ "properties": {}
74
+ },
75
+ "strict": true
76
+ }
77
+ ],
78
+ "top_p": 1,
79
+ "truncation": "disabled",
80
+ "usage": {
81
+ "input_tokens": 134,
82
+ "input_tokens_details": {
83
+ "cached_tokens": 0
84
+ },
85
+ "output_tokens": 46,
86
+ "output_tokens_details": {
87
+ "reasoning_tokens": 0
88
+ },
89
+ "total_tokens": 180
90
+ },
91
+ "user": null,
92
+ "metadata": {}
93
+ },
94
+ "headers": {},
95
+ "responseType": "js"
96
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "status": 200,
3
+ "response": {
4
+ "id": "2ebef507-bb45-4f25-bf52-87640fa092de",
5
+ "object": "chat.completion",
6
+ "created": 1751032835,
7
+ "model": "grok-3",
8
+ "choices": [
9
+ {
10
+ "index": 0,
11
+ "message": {
12
+ "role": "assistant",
13
+ "content": "\n",
14
+ "tool_calls": [
15
+ {
16
+ "id": "call_43974044",
17
+ "function": {
18
+ "name": "get_date_time",
19
+ "arguments": "{}"
20
+ },
21
+ "type": "function"
22
+ },
23
+ {
24
+ "id": "call_08990177",
25
+ "function": {
26
+ "name": "get_current_weather",
27
+ "arguments": "{\"location\":\"Amsterdam, The Netherlands\"}"
28
+ },
29
+ "type": "function"
30
+ }
31
+ ],
32
+ "refusal": null
33
+ },
34
+ "finish_reason": "stop"
35
+ }
36
+ ],
37
+ "usage": {
38
+ "prompt_tokens": 352,
39
+ "completion_tokens": 52,
40
+ "total_tokens": 404,
41
+ "prompt_tokens_details": {
42
+ "text_tokens": 352,
43
+ "audio_tokens": 0,
44
+ "image_tokens": 0,
45
+ "cached_tokens": 6
46
+ },
47
+ "completion_tokens_details": {
48
+ "reasoning_tokens": 0,
49
+ "audio_tokens": 0,
50
+ "accepted_prediction_tokens": 0,
51
+ "rejected_prediction_tokens": 0
52
+ },
53
+ "num_sources_used": 0
54
+ },
55
+ "system_fingerprint": "fp_be0739e203"
56
+ },
57
+ "headers": {},
58
+ "responseType": "js"
59
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "status": 200,
3
+ "responseType": "js",
4
+ "response": {
5
+ "id": "bf3d0a13-75f8-e2e5-4eab-93b4f20611cd",
6
+ "object": "chat.completion",
7
+ "created": 1751356925,
8
+ "model": "grok-3",
9
+ "choices": [
10
+ {
11
+ "index": 0,
12
+ "message": {
13
+ "role": "assistant",
14
+ "content": "Today is Friday, May 12, 2025, and the time is 12:45. The current weather in Amsterdam, The Netherlands, is 24°C.",
15
+ "refusal": null
16
+ },
17
+ "finish_reason": "stop"
18
+ }
19
+ ],
20
+ "usage": {
21
+ "prompt_tokens": 386,
22
+ "completion_tokens": 35,
23
+ "total_tokens": 421,
24
+ "prompt_tokens_details": {
25
+ "text_tokens": 386,
26
+ "audio_tokens": 0,
27
+ "image_tokens": 0,
28
+ "cached_tokens": 5
29
+ },
30
+ "completion_tokens_details": {
31
+ "reasoning_tokens": 0,
32
+ "audio_tokens": 0,
33
+ "accepted_prediction_tokens": 0,
34
+ "rejected_prediction_tokens": 0
35
+ },
36
+ "num_sources_used": 0
37
+ },
38
+ "system_fingerprint": "fp_be0739e203"
39
+ }
40
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "status": 200,
3
+ "response": {
4
+ "id": "080ab233-e37e-bd72-4d2e-e0fb478e05e8",
5
+ "object": "chat.completion",
6
+ "created": 1752061910,
7
+ "model": "grok-3",
8
+ "choices": [
9
+ {
10
+ "index": 0,
11
+ "message": {
12
+ "role": "assistant",
13
+ "content": "\n",
14
+ "tool_calls": [
15
+ {
16
+ "id": "call_95425891",
17
+ "function": {
18
+ "name": "get_date_time",
19
+ "arguments": "{}"
20
+ },
21
+ "type": "function"
22
+ },
23
+ {
24
+ "id": "call_27865503",
25
+ "function": {
26
+ "name": "get_current_weather",
27
+ "arguments": "{\"location\":\"Amsterdam, The Netherlands\"}"
28
+ },
29
+ "type": "function"
30
+ }
31
+ ],
32
+ "refusal": null
33
+ },
34
+ "finish_reason": "stop"
35
+ }
36
+ ],
37
+ "usage": {
38
+ "prompt_tokens": 305,
39
+ "completion_tokens": 52,
40
+ "total_tokens": 357,
41
+ "prompt_tokens_details": {
42
+ "text_tokens": 305,
43
+ "audio_tokens": 0,
44
+ "image_tokens": 0,
45
+ "cached_tokens": 2
46
+ },
47
+ "completion_tokens_details": {
48
+ "reasoning_tokens": 0,
49
+ "audio_tokens": 0,
50
+ "accepted_prediction_tokens": 0,
51
+ "rejected_prediction_tokens": 0
52
+ },
53
+ "num_sources_used": 0
54
+ },
55
+ "system_fingerprint": "fp_9ad1a16f77"
56
+ },
57
+ "headers": {},
58
+ "responseType": "js"
59
+ }
@@ -0,0 +1,10 @@
1
+ 1. Parse reponse 1 {
2
+ "status": 422,
3
+ "response": "Failed to deserialize the JSON body into the target type: messages[2]: missing field `name` at line 1 column 527",
4
+ "headers": {},
5
+ "responseType": "text"
6
+ }
7
+ (duration: 394 ms)
8
+ --------------------------------------------------
9
+ Total: 2 tests, executed: 1 in 394 ms - errors: 0
10
+ ** Not all tests have been executed **
@@ -0,0 +1,59 @@
1
+ {
2
+ "status": 200,
3
+ "responseType": "js",
4
+ "response": {
5
+ "id": "cb870601-b91e-c00f-bb28-bb3211c9ba0a",
6
+ "object": "chat.completion",
7
+ "created": 1751294195,
8
+ "model": "grok-3-mini-fast",
9
+ "choices": [
10
+ {
11
+ "index": 0,
12
+ "message": {
13
+ "role": "assistant",
14
+ "content": "\n",
15
+ "reasoning_content": "First, the user is asking two things: 1) What day is today? 2) What is the weather forecast in Amsterdam, The Netherlands.\n\nAvailable tools:\n\n- get_current_weather: This requires a location, like a city and country. The user specified \"Amsterdam, The Netherlands\", which matches perfectly.\n\n- get_date_time: This gets the current date and time. It doesn't require any parameters, so I can call it directly.\n\nI need to address both parts of the query. For the date and time, I can use get_date_time. For the weather, I can use get_current_weather with the location provided.\n\nThe description for get_current_weather says \"Get the current weather\", not \"forecast\". The user said \"weather forecast\", but the tool is for current weather. I should use it as is, since it's the closest match.\n\nIn a multi-turn conversation, I should call functions to advance the request. So, I need to call both functions.\n\nResponse guidelines: Respond precisely and concisely. Only use <function_call> tags when deciding to call a function.\n\nSince both parts can be handled by available functions, I should call them.\n\nFirst, call get_date_time for the current date and time.\n\nSecond, call get_current_weather for Amsterdam, The Netherlands.\n\nI can use multiple <function_call> tags in my response.\n\nAfter calling these functions, the system will presumably execute them and provide results, then I can respond based on that.\n\nMy response should only contain the function calls if that's the next step.\n\nStructure: If I'm calling functions, my response should just be the <function_call> tags, without additional text, to keep it concise.\n\nThe instructions say: \"You are only permitted to use the <function_call> tag in your response only if you have made the decision to call a function.\"\n\nSo, for this query, my response should consist of the function calls.\n\nOrder: Maybe call get_date_time first, then get_current_weather.\n\nFinally, once I have the results, in a subsequent turn, I can compile the answer.\n\nBut for now, in this response, I just need to output the function calls.",
16
+ "tool_calls": [
17
+ {
18
+ "id": "call_73832078",
19
+ "function": {
20
+ "name": "get_date_time",
21
+ "arguments": "{}"
22
+ },
23
+ "type": "function"
24
+ },
25
+ {
26
+ "id": "call_35308569",
27
+ "function": {
28
+ "name": "get_current_weather",
29
+ "arguments": "{\"location\":\"Amsterdam, The Netherlands\"}"
30
+ },
31
+ "type": "function"
32
+ }
33
+ ],
34
+ "refusal": null
35
+ },
36
+ "finish_reason": "stop"
37
+ }
38
+ ],
39
+ "usage": {
40
+ "prompt_tokens": 341,
41
+ "completion_tokens": 52,
42
+ "total_tokens": 827,
43
+ "prompt_tokens_details": {
44
+ "text_tokens": 341,
45
+ "audio_tokens": 0,
46
+ "image_tokens": 0,
47
+ "cached_tokens": 5
48
+ },
49
+ "completion_tokens_details": {
50
+ "reasoning_tokens": 434,
51
+ "audio_tokens": 0,
52
+ "accepted_prediction_tokens": 0,
53
+ "rejected_prediction_tokens": 0
54
+ },
55
+ "num_sources_used": 0
56
+ },
57
+ "system_fingerprint": "fp_768091f8b2"
58
+ }
59
+ }