Skip to content

Commit

Permalink
Capitalize H for header flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dyastremsky committed Dec 18, 2024
1 parent 1504cd8 commit 057e302
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions genai-perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ key authentication. To do so, you must add your API key directly in the command.
Add the following flag to your command.

```bash
-h "Authorization: Bearer ${API_KEY}" -H "Accept: text/event-stream"
-H "Authorization: Bearer ${API_KEY}" -H "Accept: text/event-stream"
```

</br>
Expand Down Expand Up @@ -467,7 +467,7 @@ Alternatively, a string representing a json formatted dict can be provided.
(default: `None`)

##### `--header <str>`
##### `--h <str>`
##### `--H <str>`
Add a custom header to the requests. Headers must be specified as
'Header:Value'. You can repeat this flag for multiple headers.
(default: `None`)
Expand Down
2 changes: 1 addition & 1 deletion genai-perf/genai_perf/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def _add_input_args(parser):

input_group.add_argument(
"--header",
"-h",
"-H",
action="append",
help="Add a custom header to the requests. "
"Headers must be specified as 'Header:Value'. "
Expand Down
2 changes: 1 addition & 1 deletion genai-perf/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_help_version_arguments_output_and_exit(
]
},
),
(["-h", "header_name:value"], {"header": ["header_name:value"]}),
(["-H", "header_name:value"], {"header": ["header_name:value"]}),
(["--header", "header_name:value"], {"header": ["header_name:value"]}),
(
["--header", "header_name:value", "--header", "header_name_2:value_2"],
Expand Down

0 comments on commit 057e302

Please sign in to comment.