mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
docs: module readmes
This commit is contained in:
parent
8269ee4197
commit
5e32873966
3 changed files with 84 additions and 23 deletions
25
README.md
25
README.md
|
|
@ -162,7 +162,7 @@ See the following pages:
|
||||||
|
|
||||||
AI suggestions should work out of the box with `request-ai` module installed.
|
AI suggestions should work out of the box with `request-ai` module installed.
|
||||||
|
|
||||||
An API key is included with the source. It should always work unless I can no longer afford this public service or rate limits are reached. If it's useful to you, **please share this project and spread the word**. Also consider making a donation to keep its public usage alive:
|
An API key is included with the source (your distribution might have stripped them out). It should always work unless I can no longer afford this public service or rate limits are reached. If it's useful to you, **please share this project and spread the word**. Also consider making a donation to keep its public usage alive:
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
|
|
@ -204,28 +204,7 @@ An API key is included with the source. It should always work unless I can no lo
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<details>
|
[AI and API configurations](./module-request-ai/README.md)
|
||||||
<summary>AI and API Configuration</summary>
|
|
||||||
|
|
||||||
> Configuration is done via environment variables:
|
|
||||||
>
|
|
||||||
> - `_PR_AI_API_KEY`: Your own API key
|
|
||||||
> - `_PR_AI_URL`: URL used. Any OpenAI compatible URL can be used, e.g.:
|
|
||||||
> - `https://api.openai.com/v1/chat/completions` (Note: OpenAI's ChatGPT is very slow)
|
|
||||||
> - `https://api.groq.com/openai/v1/chat/completions`
|
|
||||||
> - `_PR_AI_MODEL`: Model used
|
|
||||||
> - `_PR_AI_DISABLE`: Setting to any value disables AI integration
|
|
||||||
> - `_PR_AI_LOCALE`: Locale in which the AI explains the suggestion. Defaults to user system locale
|
|
||||||
|
|
||||||
> Compile time variables: Default values for the respective variables above when not set
|
|
||||||
>
|
|
||||||
> - `_DEF_PR_AI_API_KEY`
|
|
||||||
> - `_DEF_PR_AI_URL`
|
|
||||||
> - `_DEF_PR_AI_MODEL`
|
|
||||||
>
|
|
||||||
> If default values were not provided, pay-respects' own values will be used. Your request will be filtered to avoid abuse usages. Request will then be forwarded to a LLM provider that will not use your data for training.
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|
|
||||||
69
module-request-ai/README.md
Normal file
69
module-request-ai/README.md
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
# Request AI Module
|
||||||
|
|
||||||
|
Module for [pay-respects](https://codeberg.org/iff/pay-respects) to request AI for suggestions.
|
||||||
|
|
||||||
|
Compile time features:
|
||||||
|
|
||||||
|
- `libcurl` (default): Dynamically links to libcurl. Requires OpenSSL when compiling. When disabled, a curl process is spawned instead.
|
||||||
|
|
||||||
|
## Configurations
|
||||||
|
|
||||||
|
Configuration is done via environment variables:
|
||||||
|
|
||||||
|
- `_PR_AI_API_KEY`: Your own API key
|
||||||
|
- `_PR_AI_URL`: URL used. Any OpenAI compatible URL can be used, e.g.:
|
||||||
|
- `https://api.openai.com/v1/chat/completions` (Note: OpenAI's ChatGPT is very slow)
|
||||||
|
- `https://api.groq.com/openai/v1/chat/completions`
|
||||||
|
- `http://localhost:11434/api/chat`: Ollama
|
||||||
|
- `_PR_AI_MODEL`: Model used
|
||||||
|
- `_PR_AI_DISABLE`: Setting to any value disables AI integration
|
||||||
|
- `_PR_AI_LOCALE`: Locale in which the AI explains the suggestion. Defaults to user system locale
|
||||||
|
|
||||||
|
Compile time variables: Default values for the respective variables above when not set
|
||||||
|
|
||||||
|
- `_DEF_PR_AI_API_KEY`
|
||||||
|
- `_DEF_PR_AI_URL`
|
||||||
|
- `_DEF_PR_AI_MODEL`
|
||||||
|
|
||||||
|
If default values were not provided, pay-respects' own values will be used. Your request will be filtered to avoid abuse usages. Request will then be forwarded to a LLM provider that will not use your data for training. This service is provided free and is not guaranteed to always work. Donations would be appreciated:
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a
|
||||||
|
href="https://liberapay.com/iff/donate"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
><img
|
||||||
|
src="https://liberapay.com/assets/widgets/donate.svg"
|
||||||
|
alt="Donate using Liberapay"
|
||||||
|
/></a
|
||||||
|
>
|
||||||
|
<a href="https://ko-fi.com/iffse" target="_blank" rel="noreferrer"
|
||||||
|
><img
|
||||||
|
height='30'
|
||||||
|
src="https://www.vectorlogo.zone/logos/ko-fi/ko-fi-ar21.svg"
|
||||||
|
alt="Donate using Ko-fi"
|
||||||
|
style="height: 30px;"
|
||||||
|
/></a
|
||||||
|
>
|
||||||
|
<br />
|
||||||
|
<a href="https://iffse.eu.org/stripe" target="_blank" rel="noreferrer"
|
||||||
|
><img
|
||||||
|
height='30'
|
||||||
|
src="https://cdn.brandfolder.io/KGT2DTA4/at/8vbr8k4mr5xjwk4hxq4t9vs/Stripe_wordmark_-_blurple.svg"
|
||||||
|
alt="Donate using Stripe"
|
||||||
|
style="height: 30px;"
|
||||||
|
/></a
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href="https://www.paypal.com/donate/?hosted_button_id=QN7Z7ZHRAAFZL"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
><img
|
||||||
|
height='30'
|
||||||
|
src="https://upload.wikimedia.org/wikipedia/commons/b/b5/PayPal.svg"
|
||||||
|
alt="Donate using PayPal"
|
||||||
|
style="height: 25px; margin-bottom: 3px;"
|
||||||
|
/></a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
13
module-runtime-rules/README.md
Normal file
13
module-runtime-rules/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Runtime Rules Module
|
||||||
|
|
||||||
|
Module for [pay-respects](https://codeberg.org/iff/pay-respects) which allows you to parse rules at runtime.
|
||||||
|
|
||||||
|
Syntax is currently 100% compatible with [upstream's compile-time rules](https://codeberg.org/iff/pay-respects/src/branch/main/rules.md).
|
||||||
|
|
||||||
|
Rules are searched in these directories:
|
||||||
|
|
||||||
|
- `XDG_CONFIG_HOME`, defaults to `$HOME/.config`.
|
||||||
|
- `XDG_CONFIG_DIRS`, defaults to `/etc/xdg`.
|
||||||
|
- `XDG_DATA_DIRS`, defaults to `/usr/local/share:/usr/share`.
|
||||||
|
|
||||||
|
The actual rule file should be placed under `pay-respects/rules/`, for example: `~/.config/pay-respects/rules/cargo.toml`. To avoid parsing unnecessary rules, the name of the file **MUST** match the command name.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue