drop --llm-client for now

This commit is contained in:
Casper da Costa-Luis 2024-12-17 08:43:26 +00:00
parent 88961c3280
commit 68724917c7
No known key found for this signature in database
GPG key ID: D88C553DBD362CDE
2 changed files with 7 additions and 5 deletions

View file

@ -150,7 +150,7 @@ Or from the CLI:
```bash ```bash
pip install markitdown pip install markitdown
markitdown --llm-client OpenAI --llm-model gpt-4o example.jpg markitdown --llm-model gpt-4o example.jpg
``` ```
### Docker ### Docker

View file

@ -56,9 +56,10 @@ parser.add_argument(
action="store_true", action="store_true",
help="list installed 3rd-party plugins (loaded with `--use-plugin`)", help="list installed 3rd-party plugins (loaded with `--use-plugin`)",
) )
parser.add_argument("--llm-client", choices={"OpenAI"}, help="default None") parser.add_argument("--llm-model", metavar="MODEL", help="e.g. gpt-4o")
parser.add_argument("--llm-client-url", help="base URL for --llm-client") parser.add_argument(
parser.add_argument("--llm-model", help="required for --llm-client") "--llm-client-url", metavar="URL", help="base URL for OpenAI LLM client"
)
parser.add_argument( parser.add_argument(
"filename", metavar="FILENAME", nargs="?", help="if unspecified, defaults to stdin" "filename", metavar="FILENAME", nargs="?", help="if unspecified, defaults to stdin"
) )
@ -92,8 +93,9 @@ def main(args=None):
elif args.filename is None: elif args.filename is None:
raise ValueError("Filename is required when using Document Intelligence.") raise ValueError("Filename is required when using Document Intelligence.")
if args.llm_client == "OpenAI": if args.llm_model:
from openai import OpenAI from openai import OpenAI
llm_client = OpenAI(base_url=args.llm_client_url) llm_client = OpenAI(base_url=args.llm_client_url)
else: else:
llm_client = None llm_client = None