Add quarkus-vs-spring-ai module: the same support assistant (system prompt, tool, RAG) built with Quarkus LangChain4j and Spring AI against a stub OpenAI-compatible server, with wire-format capture, startup/memory benchmarks and a Quarkus native image
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4XrpfdpsacrvqnrBM
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
f4f90b3b30
commit
5e5326c810
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"model" : "stub-chat",
|
||||
"messages" : [ {
|
||||
"role" : "system",
|
||||
"content" : "You are the support assistant of an online electronics shop. Answer in one sentence. Use the order tool for order questions and the supplied policy text for policy questions."
|
||||
}, {
|
||||
"role" : "user",
|
||||
"content" : "Where is my order 1001?"
|
||||
} ],
|
||||
"presence_penalty" : 0.0,
|
||||
"frequency_penalty" : 0.0,
|
||||
"tools" : [ {
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "orderStatus",
|
||||
"description" : "Looks up the delivery status of a customer order by its order number",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"orderId" : {
|
||||
"type" : "string",
|
||||
"description" : "the numeric order number, for example 1001"
|
||||
}
|
||||
},
|
||||
"required" : [ "orderId" ]
|
||||
}
|
||||
}
|
||||
} ]
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"model" : "stub-chat",
|
||||
"messages" : [ {
|
||||
"role" : "system",
|
||||
"content" : "You are the support assistant of an online electronics shop. Answer in one sentence. Use the order tool for order questions and the supplied policy text for policy questions."
|
||||
}, {
|
||||
"role" : "user",
|
||||
"content" : "Where is my order 1001?"
|
||||
}, {
|
||||
"role" : "assistant",
|
||||
"tool_calls" : [ {
|
||||
"id" : "call_stub_1",
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "orderStatus",
|
||||
"arguments" : "{\"orderId\":\"1001\"}"
|
||||
}
|
||||
} ]
|
||||
}, {
|
||||
"role" : "tool",
|
||||
"tool_call_id" : "call_stub_1",
|
||||
"content" : "Order 1001 is shipped on 2026-11-20, arriving in 2 days"
|
||||
} ],
|
||||
"presence_penalty" : 0.0,
|
||||
"frequency_penalty" : 0.0,
|
||||
"tools" : [ {
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "orderStatus",
|
||||
"description" : "Looks up the delivery status of a customer order by its order number",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"orderId" : {
|
||||
"type" : "string",
|
||||
"description" : "the numeric order number, for example 1001"
|
||||
}
|
||||
},
|
||||
"required" : [ "orderId" ]
|
||||
}
|
||||
}
|
||||
} ]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"model" : "stub-chat",
|
||||
"messages" : [ {
|
||||
"role" : "system",
|
||||
"content" : "You are the support assistant of an online electronics shop. Answer in one sentence. Use the order tool for order questions and the supplied policy text for policy questions."
|
||||
}, {
|
||||
"role" : "user",
|
||||
"content" : "How many days do I have to return an item?\n\nAnswer using the following information:\nReturns policy: items can be returned within 30 days of delivery for a full refund. Items must be unused and in original packaging. Refunds are issued to the original payment method within 5 business days of the warehouse receiving the parcel."
|
||||
} ],
|
||||
"presence_penalty" : 0.0,
|
||||
"frequency_penalty" : 0.0,
|
||||
"tools" : [ {
|
||||
"type" : "function",
|
||||
"function" : {
|
||||
"name" : "orderStatus",
|
||||
"description" : "Looks up the delivery status of a customer order by its order number",
|
||||
"parameters" : {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"orderId" : {
|
||||
"type" : "string",
|
||||
"description" : "the numeric order number, for example 1001"
|
||||
}
|
||||
},
|
||||
"required" : [ "orderId" ]
|
||||
}
|
||||
}
|
||||
} ]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"messages" : [ {
|
||||
"content" : "You are the support assistant of an online electronics shop. Answer in one sentence. Use the order tool for order questions and the supplied policy text for policy questions.",
|
||||
"role" : "system"
|
||||
}, {
|
||||
"content" : "Where is my order 1001?\n\nContext information is below, surrounded by ---------------------\n\n---------------------\n---------------------\n\nGiven the context and provided history information and not prior knowledge,\nreply to the user comment. If the answer is not in the context, inform\nthe user that you can't answer the question.\n",
|
||||
"role" : "user"
|
||||
} ],
|
||||
"model" : "stub-chat",
|
||||
"tools" : [ {
|
||||
"function" : {
|
||||
"name" : "orderStatus",
|
||||
"description" : "Looks up the delivery status of a customer order by its order number",
|
||||
"parameters" : {
|
||||
"$schema" : "https://json-schema.org/draft/2020-12/schema",
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"orderId" : {
|
||||
"type" : "string",
|
||||
"description" : "the numeric order number, for example 1001"
|
||||
}
|
||||
},
|
||||
"required" : [ "orderId" ],
|
||||
"additionalProperties" : false
|
||||
},
|
||||
"strict" : false
|
||||
},
|
||||
"type" : "function"
|
||||
} ]
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"messages" : [ {
|
||||
"content" : "You are the support assistant of an online electronics shop. Answer in one sentence. Use the order tool for order questions and the supplied policy text for policy questions.",
|
||||
"role" : "system"
|
||||
}, {
|
||||
"content" : "Where is my order 1001?\n\nContext information is below, surrounded by ---------------------\n\n---------------------\n---------------------\n\nGiven the context and provided history information and not prior knowledge,\nreply to the user comment. If the answer is not in the context, inform\nthe user that you can't answer the question.\n",
|
||||
"role" : "user"
|
||||
}, {
|
||||
"role" : "assistant",
|
||||
"content" : "",
|
||||
"tool_calls" : [ {
|
||||
"id" : "call_stub_1",
|
||||
"function" : {
|
||||
"arguments" : "{\"orderId\":\"1001\"}",
|
||||
"name" : "orderStatus"
|
||||
},
|
||||
"type" : "function"
|
||||
} ]
|
||||
}, {
|
||||
"content" : "\"Order 1001 is shipped on 2026-11-20, arriving in 2 days\"",
|
||||
"role" : "tool",
|
||||
"tool_call_id" : "call_stub_1"
|
||||
} ],
|
||||
"model" : "stub-chat",
|
||||
"tools" : [ {
|
||||
"function" : {
|
||||
"name" : "orderStatus",
|
||||
"description" : "Looks up the delivery status of a customer order by its order number",
|
||||
"parameters" : {
|
||||
"$schema" : "https://json-schema.org/draft/2020-12/schema",
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"orderId" : {
|
||||
"type" : "string",
|
||||
"description" : "the numeric order number, for example 1001"
|
||||
}
|
||||
},
|
||||
"required" : [ "orderId" ],
|
||||
"additionalProperties" : false
|
||||
},
|
||||
"strict" : false
|
||||
},
|
||||
"type" : "function"
|
||||
} ]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"messages" : [ {
|
||||
"content" : "You are the support assistant of an online electronics shop. Answer in one sentence. Use the order tool for order questions and the supplied policy text for policy questions.",
|
||||
"role" : "system"
|
||||
}, {
|
||||
"content" : "How many days do I have to return an item?\n\nContext information is below, surrounded by ---------------------\n\n---------------------\nReturns policy: items can be returned within 30 days of delivery for a full refund. Items must be unused and in original packaging. Refunds are issued to the original payment method within 5 business days of the warehouse receiving the parcel.\n---------------------\n\nGiven the context and provided history information and not prior knowledge,\nreply to the user comment. If the answer is not in the context, inform\nthe user that you can't answer the question.\n",
|
||||
"role" : "user"
|
||||
} ],
|
||||
"model" : "stub-chat",
|
||||
"tools" : [ {
|
||||
"function" : {
|
||||
"name" : "orderStatus",
|
||||
"description" : "Looks up the delivery status of a customer order by its order number",
|
||||
"parameters" : {
|
||||
"$schema" : "https://json-schema.org/draft/2020-12/schema",
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"orderId" : {
|
||||
"type" : "string",
|
||||
"description" : "the numeric order number, for example 1001"
|
||||
}
|
||||
},
|
||||
"required" : [ "orderId" ],
|
||||
"additionalProperties" : false
|
||||
},
|
||||
"strict" : false
|
||||
},
|
||||
"type" : "function"
|
||||
} ]
|
||||
}
|
||||
Reference in New Issue
Block a user