Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add OPENAI_API_BASE for method=megaparse_vision #212

Open
qdrddr opened this issue Jan 7, 2025 · 2 comments
Open

Feature request: add OPENAI_API_BASE for method=megaparse_vision #212

qdrddr opened this issue Jan 7, 2025 · 2 comments

Comments

@qdrddr
Copy link

qdrddr commented Jan 7, 2025

Please add the OPENAI_API_BASE environment variable for method=megaparse_vision that can be pulled into the megaparse_vision via API.

Alternatively, consider adding LiteLLM SDK so I can easily switch between models and providers.

example of the environment variable:

export OPENAI_API_BASE=http://127.0.0.1:8080/v1

Code example for SDK:

from megaparse import MegaParse
from langchain_openai import ChatOpenAI
from megaparse.parser.megaparse_vision import MegaParseVision
import os

model = ChatOpenAI(model="gpt-4o", api_key=os.getenv("OPENAI_API_KEY"), base_url=os.getenv("OPENAI_API_BASE"))
@chloedia
Copy link
Collaborator

Hi @qdrddr thanks for the heads up, I will do it when i have the time ! Do not hesitate to do a pull request :)

@qdrddr
Copy link
Author

qdrddr commented Jan 21, 2025

I'm not a developer, so my programming skills are limited @chloedia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants