home-assistant.io
home-assistant.io copied to clipboard
Describe new keep_alive field in ollama.markdown
Proposed change
Update documentation to reflect proposed addition of keep_alive as a user-configurable setting. This PR accompanies the requested new PR for this feature.
Type of change
- [ ] Spelling, grammar or other readability improvements (
currentbranch). - [ ] Adjusted missing or incorrect information in the current documentation (
currentbranch). - [x] Added documentation for a new integration I'm adding to Home Assistant (
nextbranch).- [ ] I've opened up a PR to add logos and icons in Brands repository.
- [ ] Added documentation for a new feature I'm adding to Home Assistant (
nextbranch). - [ ] Removed stale or deprecated documentation.
Additional information
- Link to parent pull request in the codebase: https://github.com/home-assistant/core/pull/119341
- Link to parent pull request in the Brands repository: N/A
- This PR fixes or closes issue: fixes # N/A
Checklist
- [x] This PR uses the correct branch, based on one of the following:
- I made a change to the existing documentation and used the
currentbranch. - I made a change that is related to an upcoming version of Home Assistant and used the
nextbranch.
- I made a change to the existing documentation and used the
- [x] The documentation follows the Home Assistant documentation standards.
Summary by CodeRabbit
- New Features
- Introduced a "Keep alive" configuration parameter for Ollama integration. This allows users to set the duration (in seconds) for the model to stay in memory after receiving a message, with default set to 300 seconds, options for no limit (-1), or no retention (0).
Walkthrough
Walkthrough
The recent changes introduce a new configuration parameter called Keep alive for the Ollama integration. This parameter determines the duration (in seconds) that the Ollama host retains the model in memory after receiving a message. The default duration is set to 300 seconds (5 minutes), with options to set the retention period to no limit (-1) or no retention (0).
Changes
| Files | Change Summary |
|---|---|
source/_integrations/ollama.markdown |
Added Configuration Parameter: Introduced the Keep alive parameter to specify the duration the model stays in memory after a message (-1 = no limit, 0 = no retention). Default is 300 seconds (5 minutes). |
Recent review details
Configuration used: CodeRabbit UI Review profile: ASSERTIVE
Commits
Files that changed from the base of the PR and between ff511fe17700cac2a6da70902ec05dc4cd92ae0b and 84511cd86986e238ec9a898d7bf73deee6e4194c.
Files selected for processing (1)
- source/_integrations/ollama.markdown (1 hunks)
Additional context used
LanguageTool
source/_integrations/ollama.markdown
[misspelling] ~22-~22: Possible spelling mistake found. Context: ..._platforms: - conversation --- The Ollama {% term integration %} adds a convers...
(MORFOLOGIK_RULE_EN_US)
[misspelling] ~22-~22: Possible spelling mistake found. Context: ...t in Home Assistant powered by a local Ollama server. This con...
(MORFOLOGIK_RULE_EN_US)
[misspelling] ~24-~24: Possible spelling mistake found. Context: ...nt is unable to control your house. The Ollama conversation agent can be used in autom...
(MORFOLOGIK_RULE_EN_US)
[uncategorized] ~24-~24: You might be missing the article “the” here. Context: ...e to answer questions about your house, Home Assistant will need to provide Ollama w...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[misspelling] ~24-~24: Possible spelling mistake found. Context: ...se, Home Assistant will need to provide Ollama with the details of your house, which i...
(MORFOLOGIK_RULE_EN_US)
[misspelling] ~26-~26: Possible spelling mistake found. Context: ... This integration requires an external Ollama server, which is available for macOS, L...
(MORFOLOGIK_RULE_EN_US)
[misspelling] ~26-~26: Possible spelling mistake found. Context: ...l the server. Once installed, configure Ollama to be [accessible over the network](htt...
(MORFOLOGIK_RULE_EN_US)
[misspelling] ~33-~33: Possible spelling mistake found. Context: ... description: The URL of the external Ollama server, such as `http://localhost:11434...
(MORFOLOGIK_RULE_EN_US)
[misspelling] ~36-~36: Possible spelling mistake found. Context: .... Model: description: Name of the Ollama model to u...
(MORFOLOGIK_RULE_EN_US)
[misspelling] ~45-~45: Possible spelling mistake found. Context: ...escription: Duration in seconds for the Ollama host to keep the model in memory after ...
(MORFOLOGIK_RULE_EN_US)
[uncategorized] ~45-~45: A determiner appears to be missing. Consider inserting it. Context: ...sage (-1 = no limit, 0 = no retention). Default value is -1. {% endconfiguration_basic...
(AI_EN_LECTOR_MISSING_DETERMINER)
Markdownlint
source/_integrations/ollama.markdown
24-24: Expected: 0 or 2; Actual: 1 Trailing spaces
(MD009, no-trailing-spaces)
Additional comments not posted (3)
source/_integrations/ollama.markdown (3)
46-46: LGTM!
45-45: Verify the accuracy of the description.Ensure that the description accurately reflects the behavior of the
Keep aliveparameter.Verification successful
The description of the
Keep aliveparameter is accurate.The description in
source/_integrations/ollama.markdownclearly explains the behavior of theKeep aliveparameter, including the duration in seconds, the default value, and special cases.
source/_integrations/ollama.markdownline 45Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the description of the `Keep alive` parameter in the codebase. # Test: Search for the `Keep alive` parameter description in the codebase. Expect: Occurrences of the description. rg --type python $'keep_alive'Length of output: 60
Script:
#!/bin/bash # Description: Verify the description of the `Keep alive` parameter in the codebase. # Test: Search for the `Keep alive` parameter description in markdown files. Expect: Occurrences of the description. rg --type markdown 'Keep alive'Length of output: 133
Script:
#!/bin/bash # Description: Extract and display the relevant lines for the `Keep alive` parameter in the identified markdown files. # Extract lines around the `Keep alive` parameter in the `source/_integrations/mqtt.markdown` file. echo "Content from source/_integrations/mqtt.markdown:" rg --context 5 'Keep alive' source/_integrations/mqtt.markdown # Extract lines around the `Keep alive` parameter in the `source/_integrations/ollama.markdown` file. echo "Content from source/_integrations/ollama.markdown:" rg --context 5 'Keep alive' source/_integrations/ollama.markdownLength of output: 1429
Tools
LanguageTool
[misspelling] ~45-~45: Possible spelling mistake found. Context: ...escription: Duration in seconds for the Ollama host to keep the model in memory after ...
(MORFOLOGIK_RULE_EN_US)
[uncategorized] ~45-~45: A determiner appears to be missing. Consider inserting it. Context: ...sage (-1 = no limit, 0 = no retention). Default value is -1. {% endconfiguration_basic...
(AI_EN_LECTOR_MISSING_DETERMINER)
44-44: Verify the correctness of the default value and description.Ensure that the default value of
-1forKeep aliveis accurate, as the AI-generated summary mentions a default value of300seconds (5 minutes).
[!TIP]
Early access features
- OpenAI
gpt-4omodel for reviews and chat.Note:
- You can disable early access features from the CodeRabbit UI or by setting
early_access: falsein the CodeRabbit configuration file.- Please join our Discord Community to provide feedback and report issues.
- OSS projects are always opted into early access features.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Deploy Preview for home-assistant-docs ready!
| Name | Link |
|---|---|
| Latest commit | 84511cd86986e238ec9a898d7bf73deee6e4194c |
| Latest deploy log | https://app.netlify.com/sites/home-assistant-docs/deploys/667f9a5f31a476000867e3c1 |
| Deploy Preview | https://deploy-preview-33191--home-assistant-docs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Waiting on: https://github.com/home-assistant/core/pull/119341