Fix syntax error in Ollama example code #117
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.