-
Notifications
You must be signed in to change notification settings - Fork 228
New script ollama.py: AI auto-responder using Ollama #572
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
base: main
Are you sure you want to change the base?
Conversation
Hi, Thank you for the script. Before your script can be integrated, please:
|
…ess_hashtable() feat: rework to use hook_url instead of requests feat: non-blocking Ollama script with hook_process_hashtable, no debug logs
@@ -0,0 +1,2134 @@ | |||
[33m0e021b6[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32madd-ollama-bot[m[33m)[m New script ollama_bot.py: Adds non-blocking API calls using hook_process_hashtable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this file has been committed by error, please remove it.
@@ -0,0 +1,146 @@ | |||
import weechat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add SPDX tags for copyright/license, which have been made mandatory in the meanwhile (see Contributing guide), for example:
# SPDX-FileCopyrightText: 2025 teraflops <[email protected]>
#
# SPDX-License-Identifier: MIT
- Can respond to private messages if enabled. | ||
- Allows manual queries using the /ollama command. | ||
- Configurable via WeeChat /set commands. | ||
- Uses hook_url for non-blocking HTTP requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment says it uses hook_url
, but hook_process_hashtable
is used instead.
Using hook_url has 2 advantages:
- it does not rely on an external curl command (which may not be available), but it still uses curl internally (linked with weechat)
- it uses a thread instead of a process, which is more lightweight.
Single commit, single file added
Commit message: New script ollama.py: AI auto-responder using Ollama
No similar script already exists
Name: max 32 chars, only lower case letters, digits and underscores
Unique name, does not already exist in repository
No shebang on the first line
Comment in script with name/pseudo, e-mail and license
Only English in code/comments
Pure WeeChat API used, no extra API
Function hook_process is used for any blocking call
For Python script: works with Python 3 (Python 2 support is optional)
Score 100 / 100 displayed by weechat-script-lint