Skip to content

Commit bcb0b87

Browse files
committed
Formalise the docs and code
1 parent be6db2a commit bcb0b87

File tree

3 files changed

+6
-329
lines changed

3 files changed

+6
-329
lines changed

examples/demo_semantic_search.py

Lines changed: 0 additions & 311 deletions
This file was deleted.

tests/BENCHMARK_RESULTS.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,9 @@ Hard queries that neither method handles well. Many are abbreviations, cross-dom
8585
Requires the action_search Lambda running locally:
8686

8787
```bash
88-
# Terminal 1: Start the Lambda
89-
cd ai-generation/apps/action_search
90-
cp .env.example .env
91-
# Edit .env: set USE_LOCAL_STORE=false and TURBOPUFFER_API_KEY=tpuf_xxx
92-
make run-local
88+
# Terminal 1: Start the local action_search Lambda
9389

9490
# Terminal 2: Run benchmark
95-
cd stackone-ai-python
9691
uv run python tests/benchmark_search.py --local
9792
```
9893

tests/benchmark_search.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
Run with production API:
1010
STACKONE_API_KEY=xxx python tests/benchmark_search.py
1111
12-
Run with local Lambda (ai-generation/apps/action_search):
13-
# First, start the local Lambda:
14-
# cd ai-generation/apps/action_search && make run-local
12+
Run with local Lambda:
13+
# First, start the local action_search Lambda
1514
# Then run benchmark:
1615
python tests/benchmark_search.py --local
1716
@@ -33,7 +32,7 @@
3332
from stackone_ai.semantic_search import SemanticSearchClient, SemanticSearchResponse, SemanticSearchResult
3433
from stackone_ai.utility_tools import ToolIndex
3534

36-
# Default local Lambda URL (from ai-generation/apps/action_search docker-compose)
35+
# Default local Lambda URL
3736
DEFAULT_LOCAL_LAMBDA_URL = "http://localhost:4513/2015-03-31/functions/function/invocations"
3837

3938

@@ -51,13 +50,8 @@ def search(
5150
class LocalLambdaSearchClient:
5251
"""Client for local action_search Lambda.
5352
54-
This client connects to the local Lambda running via docker-compose
55-
from ai-generation/apps/action_search.
56-
5753
Usage:
58-
# Start local Lambda first:
59-
# cd ai-generation/apps/action_search && make run-local
60-
54+
# Start the local action_search Lambda first
6155
client = LocalLambdaSearchClient()
6256
response = client.search("create employee", connector="bamboohr", top_k=5)
6357
"""
@@ -214,7 +208,6 @@ class EvaluationTask:
214208

215209

216210
# 103 semantically-challenging evaluation queries
217-
# Ported from ai-generation/apps/action_search/tests/benchmark.integration.spec.ts
218211
EVALUATION_TASKS: list[EvaluationTask] = [
219212
# ============ ALL CONNECTORS - SEMANTIC CHALLENGES ============
220213
# HR/HRIS - Natural language
@@ -1212,7 +1205,7 @@ def main() -> None:
12121205
# Run with production API
12131206
STACKONE_API_KEY=xxx python tests/benchmark_search.py
12141207
1215-
# Run with local Lambda (start it first: cd ai-generation/apps/action_search && make run-local)
1208+
# Run with local Lambda (start the local action_search Lambda first)
12161209
python tests/benchmark_search.py --local
12171210
12181211
# Run with custom local Lambda URL

0 commit comments

Comments
 (0)