pi-chatgpt-websearch
v0.1.1
Published
Experimental Pi web-search extension backed by a user's ChatGPT OAuth connection.
Downloads
24
Maintainers
Readme
pi-chatgpt-websearch
pi-chatgpt-websearch gives Pi a chatgpt_web_search tool that uses your existing ChatGPT Plus/Pro OAuth login.
This extension uses an experimental ChatGPT search endpoint. The endpoint or response format can change without notice.
Prerequisites
- Pi 0.84.1 or newer
- A ChatGPT Plus or Pro subscription
- An
openai-codexlogin in Pi
Install
From npm:
pi install npm:pi-chatgpt-websearchFrom a local clone:
pi install /absolute/path/to/pi-chatgpt-websearchThen start Pi and authenticate:
/login openai-codexPi loads the extension automatically. The agent can call chatgpt_web_search when it needs current web information or external sources.
For a temporary test without installation:
pi -e ./src/index.tsConfiguration
All settings are optional environment variables:
| Variable | Default | Allowed values |
| --- | --- | --- |
| PI_CHATGPT_WEBSEARCH_MODEL | gpt-5.6-luna | Non-empty model ID |
| PI_CHATGPT_WEBSEARCH_REASONING_EFFORT | max | low, medium, high, xhigh, max |
| PI_CHATGPT_WEBSEARCH_RESPONSE_LENGTH | short | short, medium, long |
| PI_CHATGPT_WEBSEARCH_MAX_OUTPUT_TOKENS | 4096 | Integer from 256 through 100000 |
| PI_CHATGPT_WEBSEARCH_TIMEOUT_MS | 25000 | Integer from 100 through 120000 |
Example:
PI_CHATGPT_WEBSEARCH_RESPONSE_LENGTH=medium \
PI_CHATGPT_WEBSEARCH_TIMEOUT_MS=40000 \
piAuthentication is resolved again for each search. Pi can therefore refresh an expired OAuth token before the request. The extension does not read or store auth.json directly.
Development
bun install
bun run checkLicense
MIT
