Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ async def handle_request(request):
For quick testing without custom middleware:

```bash
curl -X POST http://localhost:8000/chat \
curl -X POST http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-User-ID: test_user_123" \
-H "conversation-id: test_conv_001" \
Expand Down
4 changes: 2 additions & 2 deletions docs/source/components/auth/mcp-auth/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ nat serve --config_file examples/MCP/simple_auth_mcp/configs/config-mcp-auth-jir

User Alice:
```bash
curl -X POST http://localhost:8000/generate \
curl -X POST http://localhost:8000/v1/workflow \
-H "Content-Type: application/json" \
-H "Cookie: nat-session=user-alice" \
-d '{"messages": [{"role": "user", "content": "What is status of AIQ-2342?"}]}'
```

User Bob (has a separate MCP client instance):
```bash
curl -X POST http://localhost:8000/generate \
curl -X POST http://localhost:8000/v1/workflow \
-H "Content-Type: application/json" \
-H "Cookie: nat-session=user-bob" \
-d '{"messages": [{"role": "user", "content": "What is status of AIQ-2507?"}]}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ When using the FastAPI front end with `nat serve`, users are identified by the `

```bash
# User "alice" makes a request
curl -X POST http://localhost:8000/generate \
curl -X POST http://localhost:8000/v1/workflow \
-H "Content-Type: application/json" \
-H "Cookie: nat-session=alice" \
-d ''{"messages": [{"role": "user", "content": "Hello"}]}''

# User "bob" makes a request (isolated from alice)
curl -X POST http://localhost:8000/generate \
curl -X POST http://localhost:8000/v1/workflow \
-H "Content-Type: application/json" \
-H "Cookie: nat-session=bob" \
-d ''{"messages": [{"role": "user", "content": "Hello"}]}''
Expand Down
2 changes: 1 addition & 1 deletion docs/source/improve-workflows/finetuning/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ nat finetune --config_file=configs/finetune.yml \

# Using remote endpoint
nat finetune --config_file=configs/finetune.yml \
--endpoint=http://localhost:8000/generate \
--endpoint=http://localhost:8000/v1/workflow \
--endpoint_timeout=600
```

Expand Down
2 changes: 1 addition & 1 deletion docs/source/improve-workflows/optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ nat optimize --config_file <path_to_config>
- `--config_file`: (Required) Path to the JSON or YAML configuration file for your workflow, for example, `config.yaml`. This file should contain the `optimizer` section as described above.
- `--dataset`: (Optional) Path to a JSON file containing the dataset for evaluation, such as `eval_dataset.json`. This will override any dataset path specified in the config file. The dataset should be a list of dictionaries, where each dictionary represents a data point and includes the necessary inputs for your workflow and the ground truth for evaluation.
- `--result_json_path`: A `JSONPath` expression to extract the result from the workflow's output. Defaults to `$`.
- `--endpoint`: If you are running your workflow as a service, you can provide the endpoint URL. For example, `http://localhost:8000/generate`.
- `--endpoint`: If you are running your workflow as a service, you can provide the endpoint URL. For example, `http://localhost:8000/v1/workflow`.
- `--endpoint_timeout`: The timeout in seconds for requests to the endpoint. Defaults to `300`.

Example:
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Options:
--skip_completed_entries Skip the dataset entries that have a generated
answer.
--endpoint TEXT Use endpoint for running the workflow. Example:
http://localhost:8000/generate
http://localhost:8000/v1/workflow
--endpoint_timeout INTEGER HTTP response timeout in seconds. Only relevant
if endpoint is specified. [default: 300]
--reps INTEGER Number of repetitions for the evaluation.
Expand Down Expand Up @@ -582,7 +582,7 @@ Options:
example, '$.output' will extract the 'output'
field from the result. [default: $]
--endpoint TEXT Use endpoint for running the workflow.
Example: http://localhost:8000/generate
Example: http://localhost:8000/v1/workflow
--endpoint_timeout INTEGER HTTP response timeout in seconds. Only
relevant if endpoint is specified.
[default: 300]
Expand Down Expand Up @@ -649,7 +649,7 @@ Use a remote endpoint for workflow execution:
<!-- path-check-skip-begin -->
```bash
nat finetune --config_file=configs/finetune.yml \
--endpoint=http://localhost:8000/generate \
--endpoint=http://localhost:8000/v1/workflow \
--endpoint_timeout=600
```
<!-- path-check-skip-end -->
Expand Down Expand Up @@ -678,7 +678,7 @@ Options:
'$.output' will extract the 'output' field from
the result. [default: $]
--endpoint TEXT Use endpoint for running the workflow. Example:
http://localhost:8000/generate
http://localhost:8000/v1/workflow
--endpoint_timeout INTEGER HTTP response timeout in seconds. Only relevant
if endpoint is specified. [default: 300]
--help Show this message and exit.
Expand Down
Loading
Loading