|
756 | 756 | border-top: 2px solid #22d3ee; |
757 | 757 | } |
758 | 758 |
|
| 759 | + /* ─── Section: Multi-Turn Matching ─────────────────────────────── */ |
| 760 | + .section-matching { |
| 761 | + padding: 4.5rem 0; |
| 762 | + position: relative; |
| 763 | + background: linear-gradient( |
| 764 | + 180deg, |
| 765 | + var(--bg-deep) 0%, |
| 766 | + #0f1628 30%, |
| 767 | + #0f1628 70%, |
| 768 | + var(--bg-deep) 100% |
| 769 | + ); |
| 770 | + } |
| 771 | + .section-matching .container { |
| 772 | + position: relative; |
| 773 | + z-index: 1; |
| 774 | + } |
| 775 | + .section-matching h2 { |
| 776 | + font-size: clamp(1.8rem, 4vw, 2.8rem); |
| 777 | + font-weight: 700; |
| 778 | + letter-spacing: -0.02em; |
| 779 | + text-align: center; |
| 780 | + margin-bottom: 1rem; |
| 781 | + } |
| 782 | + .matching-sub { |
| 783 | + text-align: center; |
| 784 | + color: var(--text-secondary); |
| 785 | + font-size: 1.05rem; |
| 786 | + max-width: 640px; |
| 787 | + margin: 0 auto 3.5rem; |
| 788 | + line-height: 1.7; |
| 789 | + } |
| 790 | + .matching-criteria { |
| 791 | + display: grid; |
| 792 | + grid-template-columns: 1fr 1fr 1fr; |
| 793 | + gap: 2rem; |
| 794 | + max-width: 900px; |
| 795 | + margin: 3rem auto 0; |
| 796 | + position: relative; |
| 797 | + } |
| 798 | + .matching-criteria::before { |
| 799 | + content: ""; |
| 800 | + position: absolute; |
| 801 | + top: 28px; |
| 802 | + left: calc(16.67% + 1rem); |
| 803 | + right: calc(16.67% + 1rem); |
| 804 | + height: 2px; |
| 805 | + background: var(--border); |
| 806 | + } |
| 807 | + .criteria-item { |
| 808 | + text-align: center; |
| 809 | + position: relative; |
| 810 | + } |
| 811 | + .criteria-item-label { |
| 812 | + width: 56px; |
| 813 | + height: 56px; |
| 814 | + border-radius: 50%; |
| 815 | + background: var(--bg-card); |
| 816 | + border: 2px solid var(--accent); |
| 817 | + display: flex; |
| 818 | + align-items: center; |
| 819 | + justify-content: center; |
| 820 | + font-family: var(--font-mono); |
| 821 | + font-size: 0.75rem; |
| 822 | + font-weight: 700; |
| 823 | + color: var(--accent); |
| 824 | + margin: 0 auto 1.25rem; |
| 825 | + position: relative; |
| 826 | + z-index: 1; |
| 827 | + } |
| 828 | + .criteria-item h3 { |
| 829 | + font-family: var(--font-mono); |
| 830 | + font-size: 0.95rem; |
| 831 | + font-weight: 600; |
| 832 | + margin-bottom: 0.5rem; |
| 833 | + } |
| 834 | + .criteria-item p { |
| 835 | + font-size: 0.875rem; |
| 836 | + color: var(--text-secondary); |
| 837 | + line-height: 1.6; |
| 838 | + } |
| 839 | + .how-it-works-list { |
| 840 | + list-style: none; |
| 841 | + padding: 0; |
| 842 | + margin: 0; |
| 843 | + } |
| 844 | + .how-it-works-list li { |
| 845 | + padding: 0.75rem 0; |
| 846 | + border-bottom: 1px solid var(--border); |
| 847 | + font-size: 0.9rem; |
| 848 | + line-height: 1.6; |
| 849 | + } |
| 850 | + .how-it-works-list li:last-child { |
| 851 | + border-bottom: none; |
| 852 | + } |
| 853 | + .how-it-works-list code { |
| 854 | + font-family: var(--font-mono); |
| 855 | + font-size: 0.85rem; |
| 856 | + color: var(--accent); |
| 857 | + background: rgba(0, 255, 136, 0.08); |
| 858 | + padding: 0.15rem 0.4rem; |
| 859 | + border-radius: 4px; |
| 860 | + } |
| 861 | + |
| 862 | + @media (max-width: 768px) { |
| 863 | + .matching-criteria { |
| 864 | + grid-template-columns: 1fr; |
| 865 | + gap: 2.5rem; |
| 866 | + } |
| 867 | + .matching-criteria::before { |
| 868 | + display: none; |
| 869 | + } |
| 870 | + } |
| 871 | + |
759 | 872 | /* ─── Section: Suite Reveal ──────────────────────────────────── */ |
760 | 873 | .section-suite { |
761 | 874 | padding: 4.5rem 0; |
@@ -1259,9 +1372,8 @@ <h1> |
1259 | 1372 | <div class="run-or">or</div> |
1260 | 1373 | <div class="run-cmd"> |
1261 | 1374 | <span class="prompt-sign">$</span> |
1262 | | - <code |
1263 | | - >docker run -v $(pwd)/fixtures:/fixtures -p 4010:4010 ghcr.io/copilotkit/aimock</code |
1264 | | - > |
| 1375 | + <!-- prettier-ignore --> |
| 1376 | + <code>docker run -v $(pwd)/fixtures:/fixtures -p 4010:4010 ghcr.io/copilotkit/aimock -h 0.0.0.0 -f /fixtures</code> |
1265 | 1377 | <button class="copy-btn" onclick="copyCmd(this)">Copy</button> |
1266 | 1378 | </div> |
1267 | 1379 | </div> |
@@ -1381,7 +1493,102 @@ <h3>Replay</h3> |
1381 | 1493 | </div> |
1382 | 1494 | </section> |
1383 | 1495 |
|
1384 | | - <!-- ─── Section 3: Transition ────────────────────────────────── --> |
| 1496 | + <!-- ─── Section 3: Multi-Turn Matching ─────────────────────────── --> |
| 1497 | + <section class="section-matching" id="matching"> |
| 1498 | + <div class="container"> |
| 1499 | + <h2 class="fade-in">Match by conversation state, not counters</h2> |
| 1500 | + <p class="matching-sub fade-in" style="transition-delay: 0.1s"> |
| 1501 | + Multi-turn AI flows — human-in-the-loop, subagents, tool use — need different |
| 1502 | + responses at different conversation stages. <code>turnIndex</code> and |
| 1503 | + <code>hasToolResult</code> match based on what’s already in the request. No mutable |
| 1504 | + server-side state, safe for concurrent and shared instances. |
| 1505 | + </p> |
| 1506 | + |
| 1507 | + <div class="demo-grid fade-in" style="transition-delay: 0.2s"> |
| 1508 | + <!-- Left: fixtures.json --> |
| 1509 | + <div class="demo-panel"> |
| 1510 | + <div class="demo-titlebar"> |
| 1511 | + <div class="dots"><span></span><span></span><span></span></div> |
| 1512 | + <span class="title">fixtures.json</span> |
| 1513 | + </div> |
| 1514 | + <div class="demo-body"> |
| 1515 | + <pre><span class="syn-bracket">{</span> |
| 1516 | + <span class="syn-key">"fixtures"</span><span class="syn-bracket">:</span> <span class="syn-bracket">[</span> |
| 1517 | + <span class="syn-bracket">{</span> |
| 1518 | + <span class="syn-key">"match"</span><span class="syn-bracket">:</span> <span class="syn-bracket">{</span> |
| 1519 | + <span class="syn-key">"userMessage"</span><span class="syn-bracket">:</span> <span class="syn-str">"plan a trip"</span><span class="syn-bracket">,</span> |
| 1520 | + <span class="syn-key">"turnIndex"</span><span class="syn-bracket">:</span> <span class="syn-num">0</span> |
| 1521 | + <span class="syn-bracket">},</span> |
| 1522 | + <span class="syn-key">"response"</span><span class="syn-bracket">:</span> <span class="syn-bracket">{</span> |
| 1523 | + <span class="syn-key">"toolCalls"</span><span class="syn-bracket">:</span> <span class="syn-bracket">[{</span> <span class="syn-key">"name"</span><span class="syn-bracket">:</span> <span class="syn-str">"generate_steps"</span> <span class="syn-bracket">}]</span> |
| 1524 | + <span class="syn-bracket">}</span> |
| 1525 | + <span class="syn-bracket">},</span> |
| 1526 | + <span class="syn-bracket">{</span> |
| 1527 | + <span class="syn-key">"match"</span><span class="syn-bracket">:</span> <span class="syn-bracket">{</span> |
| 1528 | + <span class="syn-key">"userMessage"</span><span class="syn-bracket">:</span> <span class="syn-str">"plan a trip"</span><span class="syn-bracket">,</span> |
| 1529 | + <span class="syn-key">"turnIndex"</span><span class="syn-bracket">:</span> <span class="syn-num">1</span> |
| 1530 | + <span class="syn-bracket">},</span> |
| 1531 | + <span class="syn-key">"response"</span><span class="syn-bracket">:</span> <span class="syn-bracket">{</span> |
| 1532 | + <span class="syn-key">"content"</span><span class="syn-bracket">:</span> <span class="syn-str">"Great choices! Your trip is booked."</span> |
| 1533 | + <span class="syn-bracket">}</span> |
| 1534 | + <span class="syn-bracket">}</span> |
| 1535 | + <span class="syn-bracket">]</span> |
| 1536 | +<span class="syn-bracket">}</span></pre> |
| 1537 | + </div> |
| 1538 | + </div> |
| 1539 | + |
| 1540 | + <!-- Right: how it works --> |
| 1541 | + <div class="demo-panel"> |
| 1542 | + <div class="demo-titlebar"> |
| 1543 | + <div class="dots"><span></span><span></span><span></span></div> |
| 1544 | + <span class="title">how it works</span> |
| 1545 | + </div> |
| 1546 | + <div class="demo-body"> |
| 1547 | + <ul class="how-it-works-list"> |
| 1548 | + <li> |
| 1549 | + <strong>Turn 0</strong> — no assistant messages yet → returns tool call |
| 1550 | + (<code>generate_steps</code>) |
| 1551 | + </li> |
| 1552 | + <li> |
| 1553 | + <strong>Turn 1</strong> — one assistant message in history → returns |
| 1554 | + final answer |
| 1555 | + </li> |
| 1556 | + <li> |
| 1557 | + <strong>Stateless</strong> — works with 100 concurrent clients, no shared |
| 1558 | + counters |
| 1559 | + </li> |
| 1560 | + </ul> |
| 1561 | + </div> |
| 1562 | + </div> |
| 1563 | + </div> |
| 1564 | + |
| 1565 | + <div class="matching-criteria fade-in" style="transition-delay: 0.3s"> |
| 1566 | + <div class="criteria-item"> |
| 1567 | + <div class="criteria-item-label">0,1,2</div> |
| 1568 | + <h3>turnIndex</h3> |
| 1569 | + <p> |
| 1570 | + Count of assistant messages in the request. Increases with each conversational turn. |
| 1571 | + </p> |
| 1572 | + </div> |
| 1573 | + <div class="criteria-item"> |
| 1574 | + <div class="criteria-item-label">T/F</div> |
| 1575 | + <h3>hasToolResult</h3> |
| 1576 | + <p> |
| 1577 | + Does the request contain tool results? Distinguishes pre- and post-tool-call turns. |
| 1578 | + </p> |
| 1579 | + </div> |
| 1580 | + <div class="criteria-item"> |
| 1581 | + <div class="criteria-item-label">n++</div> |
| 1582 | + <h3>sequenceIndex</h3> |
| 1583 | + <p> |
| 1584 | + Server-side counter for repeated identical requests. Use when stateless criteria |
| 1585 | + don’t apply. |
| 1586 | + </p> |
| 1587 | + </div> |
| 1588 | + </div> |
| 1589 | + </div> |
| 1590 | + </section> |
| 1591 | + |
1385 | 1592 | <!-- ─── Section 4: The Full Suite ────────────────────────────── --> |
1386 | 1593 | <section class="section-suite" id="suite"> |
1387 | 1594 | <div class="container"> |
@@ -1470,7 +1677,7 @@ <h2 class="fade-in"> |
1470 | 1677 | <div class="demo-body"> |
1471 | 1678 | <pre><span class="t-green">$</span> npx @copilotkit/aimock --config aimock.json |
1472 | 1679 |
|
1473 | | -<span class="t-blue">⚡</span> aimock v1.0.0 |
| 1680 | +<span class="t-blue">⚡</span> aimock v1.16.0 |
1474 | 1681 |
|
1475 | 1682 | <span class="t-green">✓</span> LLM <span class="t-dim">mounted at</span> /v1/chat/completions |
1476 | 1683 | <span class="t-green">✓</span> LLM <span class="t-dim">mounted at</span> /v1/messages |
|
0 commit comments