### Install Dependencies and Start Dev Server Source: https://github.com/rocketride-org/rocketride-docs/blob/main/README.md Navigate to the project directory, install Node.js dependencies, and start the local development server. Changes are reflected live. ```bash cd aparavi-docusaurus npm install npx docusaurus start ``` -------------------------------- ### Start from a Pipeline Configuration Object (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Example of starting a pipeline by directly providing a pipeline configuration object in Python. ```APIDOC ## Start from a Pipeline Configuration Object (Python) ### Description This example demonstrates initiating a pipeline by defining its configuration directly within the code as a Python dictionary. ### Code Example ```python config = { 'name': 'My Pipeline', 'project_id': 'my-project', 'source': 'webhook_1', 'components': [ {'id': 'webhook_1', 'provider': 'webhook', 'config': {}}, {'id': 'ai_chat_1', 'provider': 'ai_chat', 'config': {'model': 'gpt-4'}, 'input': [{'from': 'webhook_1', 'lane': 'output'}]}, {'id': 'response_1', 'provider': 'response', 'config': {}, 'input': [{'from': 'ai_chat_1', 'lane': 'answer'}]}, ], } result = await client.use(pipeline=config) ``` ``` -------------------------------- ### Starting a Pipeline with `use` Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md This example demonstrates how to start a pipeline using the `use` method, providing a filepath to the pipeline configuration. It shows how to obtain a task token from the result for subsequent operations. ```APIDOC ## `use` Method ### Description Starts a processing pipeline based on a provided configuration. It returns a unique token that can be used to track the pipeline's execution and interact with it. ### Method Signature `await client.use(filepath: str)` ### Parameters #### Path Parameters - **filepath** (str) - Required - The path to the JSON file containing the pipeline configuration. ### Request Example ```python from rocketride import RocketRideClient async with RocketRideClient(auth='your-api-key') as client: result = await client.use(filepath='pipeline.json') token = result['token'] print(f'Pipeline started with token: {token}') ``` ### Response #### Success Response (200) Returns a JSON object containing a task token. - **token** (str) - The unique identifier for the started pipeline task. #### Response Example ```json { "status": "OK", "data": { "token": "abc123-task-token" } } ``` ### Error Handling - `ValueError` / `Error`: Neither `filepath` nor `pipeline` was provided. - `FileNotFoundError`: The pipeline configuration file was not found at the specified path. - `json.JSONDecodeError`: The pipeline configuration file contains invalid JSON. - `RuntimeError` / `Error`: Failed to start the pipeline execution. Check the error message for details. - Authentication error: Invalid or missing API key. ``` -------------------------------- ### Start a Pipeline from a File (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Example of starting a RocketRide pipeline using a JSON configuration file in Python. ```APIDOC ## Start a Pipeline from a File (Python) ### Description This example demonstrates how to initiate a pipeline by providing the path to its configuration file. ### Code Example ```python from rocketride import RocketRideClient async with RocketRideClient(uri='https://cloud.rocketride.ai', auth='your-api-key') as client: result = await client.use(filepath='text_analyzer.json') token = result['token'] print(f'Pipeline started with token: {token}') ``` ``` -------------------------------- ### Start with Custom Parameters (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Example of starting a pipeline with custom parameters like threads, arguments, source override, and TTL in Python. ```APIDOC ## Start with Custom Parameters (Python) ### Description This example shows how to configure a pipeline with specific settings beyond the basic file path. ### Code Example ```python result = await client.use( filepath='data_processor.json', threads=8, args=['--verbose'], source='custom_input', ttl=300, ) token = result['token'] ``` ``` -------------------------------- ### Start, Send Data, and Check Status with use() Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md This example demonstrates a full workflow: starting a pipeline with `use()`, sending data for processing with `send()`, and checking the task status with `get_task_status()` before terminating. ```python from rocketride import RocketRideClient async with RocketRideClient(auth='your-api-key') as client: # Start pipeline result = await client.use(filepath='pipeline.json') token = result['token'] # Send data for processing response = await client.send(token, 'Analyze this text for sentiment') # Check status status = await client.get_task_status(token) print(f'State: {status["state"]}') # Terminate when done await client.terminate(token) ``` -------------------------------- ### Start a Pipeline from a File (TypeScript) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Example of starting a RocketRide pipeline using a JSON configuration file in TypeScript. ```APIDOC ## Start a Pipeline from a File (TypeScript) ### Description This example demonstrates how to initiate a pipeline by providing the path to its configuration file. ### Code Example ```typescript import { RocketRideClient } from 'rocketride'; const client = new RocketRideClient({ auth: 'your-api-key', uri: 'https://cloud.rocketride.ai', }); await client.connect(); const result = await client.use({ filepath: './text_analyzer.json' }); console.log(`Pipeline started with token: ${result.token}`); await client.disconnect(); ``` ``` -------------------------------- ### Start with Custom Parameters (TypeScript) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Example of starting a pipeline with custom parameters like threads, arguments, source override, and TTL in TypeScript. ```APIDOC ## Start with Custom Parameters (TypeScript) ### Description This example shows how to configure a pipeline with specific settings beyond the basic file path. ### Code Example ```typescript const result = await client.use({ filepath: './data_processor.json', threads: 8, args: ['--verbose'], source: 'custom_input', ttl: 300, }); ``` ``` -------------------------------- ### Add Examples to a Question Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md The `addExample` method allows you to provide input/output pairs to guide the AI's response format and content. The `result` can be a dictionary, list, or string. ```python question.addExample(given='What is the capital of France?', result='Paris') ``` -------------------------------- ### Handle Pipeline Start Errors Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md This example shows how to catch common exceptions like `FileNotFoundError` for missing pipeline files or `RuntimeError` for pipeline execution failures. ```python from rocketride import RocketRideClient, RocketRideException try: result = await client.use(filepath='pipeline.json') except FileNotFoundError: print('Pipeline file not found') except RuntimeError as e: print(f'Pipeline failed to start: {e}') ``` -------------------------------- ### Start Pipeline with Custom Parameters (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Starts a pipeline with a configuration file, overriding default settings with custom threads, arguments, source, and TTL. ```python result = await client.use( filepath='data_processor.json', threads=8, args=['--verbose'], source='custom_input', ttl=300, ) token = result['token'] ``` -------------------------------- ### Start Pipeline from File (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Initiates a pipeline using a JSON configuration file. The returned token is essential for further interactions with the pipeline. ```python from rocketride import RocketRideClient async with RocketRideClient(uri='https://cloud.rocketride.ai', auth='your-api-key') as client: result = await client.use(filepath='text_analyzer.json') token = result['token'] print(f'Pipeline started with token: {token}') ``` -------------------------------- ### Install RocketRide Node.js SDK Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Install the RocketRide SDK using npm, Yarn, or PNPM. ```bash # NPM npm install rocketride # Yarn yarn add rocketride # PNPM pnpm add rocketride ``` -------------------------------- ### Add Example to Question Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Supplies an example input and its corresponding desired output to help the AI understand the expected response format. ```typescript question.addExample('Input text', 'Expected output'); ``` -------------------------------- ### RocketRideClient Usage Examples Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md Examples demonstrating how to use the RocketRideClient for various tasks. ```APIDOC ## RocketRideClient Usage Examples ### Description Examples demonstrating how to use the RocketRideClient for various tasks. ### 1. Minimal: connect, run pipeline from file, send one string, disconnect ```python import asyncio from rocketride import RocketRideClient async def main(): client = RocketRideClient(uri="https://cloud.rocketride.ai", auth="my-key") await client.connect() result = await client.use(filepath="pipeline.json") token = result["token"] out = await client.send(token, "Hello, pipeline!", objinfo={"name": "input.txt"}, mimetype="text/plain") print(out) await client.terminate(token) await client.disconnect() asyncio.run(main()) ``` ### 2. One-off script with context manager (recommended) ```python import asyncio from rocketride import RocketRideClient async def main(): async with RocketRideClient(uri="wss://cloud.rocketride.ai", auth="my-key") as client: result = await client.use(pipeline={"pipeline": my_pipeline_config}) token = result["token"] await client.send(token, '{"data": 1}') status = await client.get_task_status(token) print(status) await client.terminate(token) asyncio.run(main()) ``` ``` -------------------------------- ### Start Pipeline from File (TypeScript) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Initiates a pipeline using a JSON configuration file. The returned token is essential for further interactions with the pipeline. ```typescript import { RocketRideClient } from 'rocketride'; const client = new RocketRideClient({ auth: 'your-api-key', uri: 'https://cloud.rocketride.ai', }); await client.connect(); const result = await client.use({ filepath: './text_analyzer.json' }); console.log(`Pipeline started with token: ${result.token}`); await client.disconnect(); ``` -------------------------------- ### Start a Pipeline Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Starts a pipeline execution. You can provide the pipeline configuration directly or via a file path. The client will substitute environment variables for placeholders like `${ROCKETRIDE_*}`. The returned token is essential for subsequent operations. ```APIDOC ## use ### Description Starts a pipeline. You must pass either `pipeline` (object) or `filepath` (path to a JSON file; Node only). The client substitutes `${ROCKETRIDE_*}` in the config from its `env` (or `.env`). Returns at least `token`; use that token for `send()`, `sendFiles()`, `pipe()`, `chat()`, `getTaskStatus()`, and `terminate()`. ### Method `use(options?: { token?: string; filepath?: string; pipeline?: PipelineConfig; source?: string; threads?: number; useExisting?: boolean; args?: string[]; ttl?: number }): Promise & { token: string }> ` ### Parameters #### Options - **token** (string) - Optional - An existing token to reuse. - **filepath** (string) - Optional - Path to a JSON file containing the pipeline configuration (Node.js only). - **pipeline** (PipelineConfig) - Optional - An object representing the pipeline configuration. - **source** (string) - Optional - Source code for the pipeline. - **threads** (number) - Optional - Number of threads to use for execution. - **useExisting** (boolean) - Optional - Whether to use an existing pipeline if available. - **args** (string[]) - Optional - Arguments to pass to the pipeline. - **ttl** (number) - Optional - Time-to-live for the pipeline task in seconds. ### Returns - **Promise & { token: string }>** - A promise that resolves to an object containing the pipeline token and other results. ``` -------------------------------- ### Start Pipeline with Custom Parameters (TypeScript) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Starts a pipeline with a configuration file, overriding default settings with custom threads, arguments, source, and TTL. ```typescript const result = await client.use({ filepath: './data_processor.json', threads: 8, args: ['--verbose'], source: 'custom_input', ttl: 300, }); ``` -------------------------------- ### Quick Start: Initialize and Run a Pipeline Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Initialize the RocketRide client, connect to the cloud, use a pipeline, send data, and disconnect. Ensure your ROCKETRIDE_APIKEY environment variable is set. ```typescript import { RocketRideClient } from 'rocketride'; const client = new RocketRideClient({ auth: process.env.ROCKETRIDE_APIKEY!, uri: 'https://cloud.rocketride.ai', }); await client.connect(); const { token } = await client.use({ filepath: './pipeline.pipe' }); const result = await client.send(token, 'Hello, pipeline!', { name: 'input.txt' }, 'text/plain'); console.log(result); await client.terminate(token); await client.disconnect(); ``` -------------------------------- ### Example Task Status Response Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/get-task-status-method/get-task-status-method.md This is an example of the full `TASK_STATUS` object returned by the method. It includes details about the task's state, progress, and metrics. ```json { "name": "text_analyzer", "project_id": "my-project", "state": 3, "completed": false, "startTime": 1700000000.0, "endTime": 0.0, "totalCount": 100, "completedCount": 45, "failedCount": 2, "rateCount": 5, "errors": [], "warnings": [], "metrics": { "cpu_percent": 25.3, "cpu_memory_mb": 512.0, "gpu_memory_mb": 1024.0 }, "tokens": { "cpu_utilization": 1.5, "cpu_memory": 0.8, "gpu_memory": 2.1, "total": 4.4 }, "pipeflow": { "totalPipes": 2, "byPipe": { "0": ["source", "transform", "filter"], "1": ["source", "transform"] } } } ``` -------------------------------- ### Instantiate Client with Persistence and Callbacks Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md Example of creating a RocketRideClient instance with automatic reconnection enabled (`persist=True`) and custom error handling for connection failures. This setup is useful for long-running applications or UIs that need to maintain a connection. ```python client = RocketRideClient( uri="https://cloud.rocketride.ai", auth="my-key", persist=True, max_retry_time=300000, on_connect_error=lambda msg: print("Connect error:", msg), on_event=handle_event, ) ``` -------------------------------- ### Validate Before Starting Pipeline (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/validate-method/validate-method.md Illustrates a common pattern of validating a pipeline configuration before initiating its execution using the `use` method. This ensures that only valid pipelines are started. ```python # Validate first, then start if valid result = await client.validate(pipeline) # Check the result for errors before proceeding # (exact structure depends on pipeline configuration) task = await client.use(pipeline=pipeline) ``` -------------------------------- ### Basic Status Check (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/get-task-status-method/get-task-status-method.md Example of initiating a pipeline with `use()` and then checking its status using `get_task_status()`. Ensure you have the RocketRideClient imported and authenticated. ```python from rocketride import RocketRideClient async with RocketRideClient(auth='your-api-key') as client: result = await client.use(filepath='pipeline.json') token = result['token'] status = await client.get_task_status(token) print(f'State: {status["state"]}') print(f'Progress: {status["completedCount"]}/{status["totalCount"]}') ``` -------------------------------- ### Install RocketRide Python SDK Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md Install the RocketRide Python SDK using pip. This command should be run in your terminal or command prompt. ```bash pip install rocketride ``` -------------------------------- ### Start Pipeline from Configuration Object (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/use-method/use-method.md Initiates a pipeline directly from a Python dictionary representing the pipeline configuration. This is useful for dynamically defined pipelines. ```python config = { 'name': 'My Pipeline', 'project_id': 'my-project', 'source': 'webhook_1', 'components': [ {'id': 'webhook_1', 'provider': 'webhook', 'config': {}}, {'id': 'ai_chat_1', 'provider': 'ai_chat', 'config': {'model': 'gpt-4'}, 'input': [{'from': 'webhook_1', 'lane': 'output'}]}, {'id': 'response_1', 'provider': 'response', 'config': {}, 'input': [{'from': 'ai_chat_1', 'lane': 'answer'}]}, ], } result = await client.use(pipeline=config) ``` -------------------------------- ### Run rocketride-mcp from command line Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/mcp_server/rocketride-mcp-server/rocketride-mcp-server.md Execute the rocketride-mcp server using its installed entry point or by running it as a Python module. ```bash # Using the installed entry point rocketride-mcp # Or using Python module python -m rocketride_mcp ``` -------------------------------- ### Basic Status Check (TypeScript) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/get-task-status-method/get-task-status-method.md Example of initiating a pipeline with `use()` and then checking its status using `getTaskStatus()`. Ensure you have the RocketRideClient imported and connected. ```typescript import { RocketRideClient } from 'rocketride'; const client = new RocketRideClient({ auth: 'your-api-key' }); await client.connect(); const result = await client.use({ filepath: './pipeline.json' }); const status = await client.getTaskStatus(result.token); console.log(`State: ${status.state}`); console.log(`Progress: ${status.completedCount}/${status.totalCount}`); await client.disconnect(); ``` -------------------------------- ### Install and Run RocketRide MCP SSE Mode Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/mcp_server/rocketride-mcp-server/rocketride-mcp-server.md Install the necessary package and run the RocketRide MCP server in SSE mode for remote or Docker deployments. Supports Bearer token authentication via `MCP_API_KEY`. ```bash pip install rocketride-mcp[sse] rocketride-mcp-sse --host 0.0.0.0 --port 8080 ``` -------------------------------- ### Validate Pipeline Configuration Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Validates a pipeline configuration without initiating its execution. This is useful for checking the correctness of your pipeline setup and identifying potential errors or warnings before starting. ```APIDOC ## validate ### Description Validates a pipeline configuration without starting it. Returns validation results (e.g. errors, warnings). Use to check pipeline correctness before `use()`. ### Method `validate(options: { pipeline: PipelineConfig | Record; source?: string }): Promise>` ### Parameters #### Options - **pipeline** (PipelineConfig | Record) - Required - The pipeline configuration object or a record representing it. - **source** (string) - Optional - Source code for the pipeline. ### Returns - **Promise>** - A promise that resolves to an object containing validation results. ``` -------------------------------- ### Question Object Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md The `Question` object, from `rocketride.schema`, is used to construct detailed prompts for the AI. You can add instructions, examples, context, history, and documents to guide the AI's response. ```APIDOC ## Question From `rocketride.schema`. Build a question for `client.chat(token=..., question=question)`. Add instructions, examples, context, history, and documents to steer the AI. ### Constructor ```python Question( type: QuestionType = QuestionType.QUESTION, filter: DocFilter = None, expectJson: bool = False, role: str = '', ) ``` `QuestionType`: `QUESTION`, `SEMANTIC`, `KEYWORD`, `GET`, `PROMPT`. Default type is `QUESTION`. Default filter and `expectJson=False`, `role=''` if omitted. ### Methods - **addInstruction** (`addInstruction(self, title: str, instruction: str)`): Adds an instruction (e.g. "Use bullet points"). - **addExample** (`addExample(self, given: str, result: dict | list | str)`): Adds an example input/output; `result` can be dict/list (JSON-serialized). - **addContext** (`addContext(self, context: str | dict | List[str] | List[dict])`): Adds context. - **addHistory** (`addHistory(self, item: QuestionHistory)`): Adds a history item for multi-turn chat. - **addQuestion** (`addQuestion(self, question: str)`): Appends the question text. - **addDocuments** (`addDocuments(self, documents: Doc | List[Doc])`): Adds documents for the AI to reference. - **getPrompt** (`getPrompt(self, has_previous_json_failed: bool = False) -> str`): Returns the full prompt (internal). ``` -------------------------------- ### Chat with Instructions and Parse JSON Answer Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md Engages in a chat interaction, providing instructions and examples to guide the AI's response, and then parses the JSON output. Use when expecting structured data from the chat model. ```python import asyncio from rocketride import RocketRideClient from rocketride.schema import Question, Answer async def main(): async with RocketRideClient(uri="https://cloud.rocketride.ai", auth="my-key") as client: result = await client.use(filepath="chat_pipeline.json") token = result["token"] question = Question(expectJson=True) question.addInstruction("Format", "Return a JSON object with keys: summary, keywords.") question.addExample("Summarize X", {"summary": "...", "keywords": ["a", "b"]}) question.addQuestion("Summarize the main points and list keywords.") response = await client.chat(token=token, question=question) answer_text = response.get("data", {}).get("answer") or (response.get("answers") or [None])[0] structured = Answer().parseJson(answer_text) if answer_text else None print(structured) await client.terminate(token) asyncio.run(main()) ``` -------------------------------- ### Serve Production Build Locally Source: https://github.com/rocketride-org/rocketride-docs/blob/main/README.md Test the production build locally before deploying. The 'build' folder is served at http://localhost:3000/. ```bash npm run serve ``` -------------------------------- ### Install rocketride-mcp Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/mcp_server/rocketride-mcp-server/rocketride-mcp-server.md Install the rocketride-mcp package using pip. Requires Python 3.10+ and rocketride-client-python >= 1.1.0. ```bash pip install rocketride-mcp ``` -------------------------------- ### Using Prompts Programmatically Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/mcp_server/rocketride-mcp-server/rocketride-mcp-server.md Shows how to list available prompts and retrieve rendered prompts using the session object. ```APIDOC ## Using Prompts Programmatically Interact with prompts programmatically using the session object. ### List Available Prompts ```python prompts = await session.list_prompts() ``` ### Get a Rendered Prompt ```python result = await session.get_prompt("analyze-document", arguments={ "pipeline": "my-pipeline", "query": "Summarize the key findings" }) # result.messages[0].content.text contains the rendered message ``` ``` -------------------------------- ### Instantiate RocketRideClient Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Create a client instance with optional authentication and URI. The client does not connect until `connect()` is called. ```typescript const client = new RocketRideClient({ auth: 'my-key', uri: 'https://cloud.rocketride.ai' }); await client.connect(); ``` -------------------------------- ### Get Task Status Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/get-task-status-method/get-task-status-method.md Retrieves the current status of a task. This method communicates via the RocketRide DAP protocol over WebSocket. The equivalent HTTP endpoint is GET /task?token={token}. ```APIDOC ## GET /task ### Description Retrieves the current status of a task. ### Method GET ### Endpoint /task ### Query Parameters - **token** (string) - Required - The token identifying the task. ### Response #### Success Response (200) - **TASK_STATUS** (object) - The full task status object. ### Response Example ```json { "name": "text_analyzer", "project_id": "my-project", "state": 3, "completed": false, "startTime": 1700000000.0, "endTime": 0.0, "totalCount": 100, "completedCount": 45, "failedCount": 2, "rateCount": 5, "errors": [], "warnings": [], "metrics": { "cpu_percent": 25.3, "cpu_memory_mb": 512.0, "gpu_memory_mb": 1024.0 }, "tokens": { "cpu_utilization": 1.5, "cpu_memory": 0.8, "gpu_memory": 2.1, "total": 4.4 }, "pipeflow": { "totalPipes": 2, "byPipe": { "0": ["source", "transform", "filter"], "1": ["source", "transform"] } } } ``` ### Error Handling - **RuntimeError** / **Error**: Status retrieval failed (e.g., invalid token, server error). - **Authentication error**: Invalid or missing API key. ``` -------------------------------- ### Map URL Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/tools/firecrawl/firecrawl.md Discovers all URLs within a given website, starting from a root URL. ```APIDOC ## firecrawl.map_url ### Description Discovers all URLs within a website. ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **url** (string) - Required - Root URL to map ### Request Example ```json { "url": "https://example.com" } ``` ### Response #### Success Response (200) - **links** (array) - An array of discovered links across the site. ``` -------------------------------- ### Build Production Site Source: https://github.com/rocketride-org/rocketride-docs/blob/main/README.md Generate static HTML, JavaScript, and CSS files for production deployment. The output is placed in the 'build' folder. ```bash npm run build ``` -------------------------------- ### Initialize Question with Options Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Constructs a new Question object, optionally specifying the question type, document filter, JSON expectation, and AI role. ```typescript const question = new Question({ type: QuestionType.PROMPT, expectJson: true, role: 'developer' }); ``` -------------------------------- ### Create DataPipe (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/send-method/send-method.md Initializes a streaming data pipe for sending large datasets in chunks. Recommended to use with a context manager. ```python async with await client.pipe(token, mime_type='text/csv') as pipe: for chunk in csv_chunks: await pipe.write(chunk.encode()) result = await pipe.close() ``` -------------------------------- ### RocketRide Client with Context Manager Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md Use the RocketRide client within an asynchronous context manager for recommended usage. This example shows running a pipeline defined inline, sending JSON data, and checking task status. ```python import asyncio from rocketride import RocketRideClient async def main(): async with RocketRideClient(uri="wss://cloud.rocketride.ai", auth="my-key") as client: result = await client.use(pipeline={"pipeline": my_pipeline_config}) token = result["token"] await client.send(token, '{"data": 1}') status = await client.get_task_status(token) print(status) await client.terminate(token) asyncio.run(main()) ``` -------------------------------- ### Add Instructions to a Question Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/python-sdk.md Use the `addInstruction` method to provide specific guidance to the AI, such as formatting requirements for the answer. ```python question.addInstruction(title='Formatting', instruction='Use bullet points') ``` -------------------------------- ### Close DataPipe and Get Result Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/sdk/node-sdk.md Finalizes the streaming upload and retrieves the processing result from the server. This operation is idempotent if the pipe is already closed. ```typescript const result = await pipe.close(); ``` -------------------------------- ### Send Multiple Files with Metadata (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/send-method/send-method.md Uploads a list of files with optional metadata and MIME types. Ensure the client is initialized with authentication. ```python from rocketride import RocketRideClient async with RocketRideClient(auth='your-api-key') as client: result = await client.use(filepath='document_processor.json') token = result['token'] # Simple file list files = ['document1.pdf', 'data.csv', 'report.docx'] results = await client.send_files(files, token) for r in results: if r['action'] == 'complete': print(f"Uploaded {r['filepath']} in {r['upload_time']:.2f}s") else: print(f"Failed {r['filepath']}: {r['error']}") # With metadata and MIME types files = [ ('report.pdf', {'department': 'finance'}), ('data.csv', {'type': 'quarterly'}, 'text/csv'), ] results = await client.send_files(files, token) ``` -------------------------------- ### Get Task Status Method Signature (TypeScript) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/get-task-status-method/get-task-status-method.md Asynchronous method signature for retrieving task status in TypeScript. Requires an authentication token. ```typescript const status = await client.getTaskStatus(token); ``` -------------------------------- ### Get Task Status Method Signature (Python) Source: https://github.com/rocketride-org/rocketride-docs/blob/main/docs/api/get-task-status-method/get-task-status-method.md Asynchronous method signature for retrieving task status in Python. Requires an authentication token. ```python status = await client.get_task_status(token) ```