@earendil-works/pi-radius-work 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# `@earendil-works/pi-radius-work`
|
|
2
|
+
|
|
3
|
+
Google Workspace authentication and image generation through Radius for [Pi](https://github.com/badlogic/pi-mono).
|
|
4
|
+
|
|
5
|
+
## Included resources
|
|
6
|
+
|
|
7
|
+
- `/google-workspaces` command for connecting a Google Workspace account through Radius OAuth
|
|
8
|
+
- `image_generation` tool for generating or editing images through Radius
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pi install npm:@earendil-works/pi-radius-work
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Restart Pi or run `/reload` after installation. Inspect or enable the installed extensions with:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pi list
|
|
20
|
+
pi config
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Image generation requires a Radius model and Radius authentication. Install the core Radius package if it is not already present:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pi install npm:@earendil-works/pi-radius
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then run `/login radius` and select a Radius model with `/model`.
|
|
30
|
+
|
|
31
|
+
## Google Workspace login
|
|
32
|
+
|
|
33
|
+
Run:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/google-workspaces
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Pi opens a browser to complete authentication and stores the resulting token by account under:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
~/.pi/google-workspace/tokens/
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Set `GOOGLE_WORKSPACE_TOKENS_DIR` to use another token directory. Set `GOOGLE_WORKSPACE_CALLBACK_HOST` to override the local OAuth callback host (the default is `localhost`).
|
|
46
|
+
|
|
47
|
+
## Image generation
|
|
48
|
+
|
|
49
|
+
The `image_generation` tool accepts a text prompt and optional base64-encoded input images. It can generate a new image or edit supplied images. The tool is only available while the current model uses the `radius` or `radius-dev` provider.
|
|
50
|
+
|
|
51
|
+
The gateway defaults to `https://radius.pi.dev`. Development and API-key overrides use `PI_GATEWAY`, `PI_GATEWAY_API_KEY`, `PI_DEV_GATEWAY`, and `PI_DEV_GATEWAY_API_KEY`.
|
|
52
|
+
|
|
53
|
+
## Local development
|
|
54
|
+
|
|
55
|
+
From the repository root:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pi -e ./packages/pi-radius-work
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or load one extension directly:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pi -e ./packages/pi-radius-work/extensions/radius-google-workspaces.ts
|
|
65
|
+
pi -e ./packages/pi-radius-work/extensions/radius-image-generation.ts
|
|
66
|
+
```
|