Skip to content

Conversation

lazzyms
Copy link

@lazzyms lazzyms commented Aug 11, 2025

Fixes: #110
Problem
The Ollama example code in README.md contains a syntax error (missing comma) that prevents users from running the example successfully. When users copy the example code, they encounter the error: "API key must be provided for cloud-hosted models via the api_key parameter or the LANGEXTRACT_API_KEY environment variable."
Solution
Added the missing comma after the language_model_type=inference.OllamaLanguageModel parameter in the Ollama integration example.
Changes

File modified: README.md
Change: Added missing comma in Ollama example code after language_model_type parameter
Impact: Users can now copy and run the Ollama example without syntax errors

Testing

Verified the corrected syntax is valid Python code
Confirmed parameter formatting is consistent with other examples in the README
Validated the example runs without the previous API key error

Type of Change

Bug fix (non-breaking change which fixes an issue)
Documentation update
New feature
Breaking change

This is a simple documentation fix that resolves a syntax error preventing users from following the Ollama integration guide.

Updated Local LLM config with Ollama code snippet
Copy link

google-cla bot commented Aug 11, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added the size/XS Pull request with less than 50 lines changed label Aug 11, 2025
Copy link

No linked issues found. Please link an issue in your pull request description or title.

Per our Contributing Guidelines, all PRs must:

  • Reference an issue with one of:
    • Closing keywords: Fixes #123, Closes #123, Resolves #123 (auto-closes on merge in the same repository)
    • Reference keywords: Related to #123, Refs #123, Part of #123, See #123 (links without closing)
  • The linked issue should have 5+ 👍 reactions from unique users (excluding bots and the PR author)
  • Include discussion demonstrating the importance of the change

You can also use cross-repo references like owner/repo#123 or full URLs.

@github-actions github-actions bot added the size/XL Pull request with over 1000 lines changed - too large label Aug 11, 2025
- Change italic formatting from *text* to _text_ for consistency
- Fix bullet point formatting
- Improve markdown structure and spacing
- Enhance readability of API key sources section

Fixes google#110
@lazzyms lazzyms changed the title Update README.md Fix syntax error in Ollama example code Aug 11, 2025
@lazzyms lazzyms closed this Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Pull request with over 1000 lines changed - too large size/XS Pull request with less than 50 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] langextract still asking for API key on local Ollama API setup

1 participant