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

feat: allow passing API_BASE as optional parameter for openai provider #6820

Merged
merged 11 commits into from
Jan 30, 2024

Conversation

augchan42
Copy link
Contributor

  • API_BASE can now be passed as an optional parameter in the getting_started sample. PromptNode and PromptModel were enhanced to allow passing of this parameter.

    • This allows RAG against a local LLM, so long as it exposes an OpenAI compatible endpoint (such as LM Studio)
  • Logging in the sample was made more verbose, I did this so people could better see what was happening under the covers. Feel free to reject this change if this isn't wanted.

@augchan42 augchan42 requested a review from a team as a code owner January 23, 2024 16:04
@augchan42 augchan42 requested review from shadeMe and removed request for a team January 23, 2024 16:04
@augchan42 augchan42 requested a review from a team as a code owner January 23, 2024 16:11
@augchan42 augchan42 requested review from dfokina and removed request for a team January 23, 2024 16:11
@augchan42 augchan42 changed the title allow passing API_BASE as optional parameter for openai provider feat: allow passing API_BASE as optional parameter for openai provider Jan 25, 2024
examples/getting_started.py Outdated Show resolved Hide resolved
examples/getting_started.py Outdated Show resolved Hide resolved
haystack/nodes/prompt/invocation_layer/open_ai.py Outdated Show resolved Hide resolved
haystack/nodes/prompt/prompt_model.py Outdated Show resolved Hide resolved
haystack/utils/getting_started.py Outdated Show resolved Hide resolved
@shadeMe shadeMe self-requested a review January 28, 2024 22:29
Copy link
Collaborator

@shadeMe shadeMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! One more change.

haystack/nodes/prompt/invocation_layer/open_ai.py Outdated Show resolved Hide resolved
@shadeMe shadeMe merged commit a0a54dc into deepset-ai:v1.x Jan 30, 2024
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants