Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GautamVhavle/CatGPT-Gateway
/ functions
Functions
289 in github.com/GautamVhavle/CatGPT-Gateway
⨍
Functions
289
◇
Types & classes
51
↳
Endpoints
10
Method
_on_request
(self, request: Request)
src/network_recorder.py:38
Method
_on_response
(self, response: Response)
src/network_recorder.py:52
Method
_tick
(self)
src/cli/app.py:190
Method
action_export
(self)
src/cli/app.py:616
Function
add_numbers
Add two numbers together and return the result.
scripts/test_langchain_tools.py:61
Function
calculate_expression
Evaluate a math expression (e.g., '7*8+3').
scripts/test_langchain_tools.py:71
Function
chat
Start an interactive CATGPT terminal session.
src/cli/app.py:673
Function
chat
Send a message in the current conversation.
src/api/routes.py:80
Function
chat_in_thread
Send a message in a specific thread. Navigates to it first.
src/api/routes.py:95
Method
chat_log
(self)
src/cli/app.py:307
Method
compose
(self)
src/cli/app.py:114
Method
compose
(self)
src/cli/app.py:140
Method
compose
(self)
src/cli/app.py:168
Method
compose
(self)
src/cli/app.py:181
Method
compose
(self)
src/cli/app.py:216
Method
compose
(self)
src/cli/app.py:294
Method
context
Get the browser context.
src/browser/manager.py:363
Function
create_chat_completion
OpenAI-compatible chat completions endpoint. Converts the message array into a single prompt, sends it to ChatGPT via browser automation
src/api/openai_routes.py:743
Function
create_image
OpenAI-compatible image generation endpoint. Sends the prompt to ChatGPT which uses DALL-E to generate images. Downloads the generated i
src/api/openai_routes.py:621
Function
create_response
OpenAI Responses API endpoint — compatible with Codex CLI. Accepts the Responses API format (flat tools, `input` field, `instructions`),
src/api/openai_routes.py:1227
Method
get_current_thread_url
Get the current page URL (contains thread ID if in a conversation).
src/chatgpt/client.py:404
Function
get_current_time
Get the current date and time. Returns ISO format datetime string.
scripts/test_langchain_tools.py:56
Function
get_stealth
Return the shared Stealth instance (for use with launch helpers).
src/browser/stealth.py:86
Function
healthz
Unauthenticated health-check for Docker / load-balancers.
src/api/server.py:181
Function
lifespan
Startup: launch browser. Shutdown: close it.
src/api/server.py:40
Function
list_models
List available models — returns our single browser-backed model.
src/api/openai_routes.py:609
Function
list_threads
List recent conversation threads from the sidebar.
src/api/routes.py:134
Method
list_threads
Scrape the sidebar for recent conversation threads. Returns a list of dicts: [{id, title, url}, ...]
src/chatgpt/client.py:410
Function
method_clipboard_paste
Method 2: Set clipboard and paste via Cmd+V.
scripts/test_input_methods.py:115
Function
method_dispatch_input_event
Method 4: Set innerHTML + dispatch input event.
scripts/test_input_methods.py:137
Function
method_exec_command
Method 5: document.execCommand('insertText') — fires proper input events.
scripts/test_input_methods.py:170
Function
method_fill
Method 3: Playwright's fill() — uses CDP Input.insertText.
scripts/test_input_methods.py:131
Function
method_react_native_setter
Method 6: Use React's internal value setter to update state.
scripts/test_input_methods.py:186
Function
multi_arg_tool
Return the product of three numbers.
scripts/test_langchain_tools.py:89
Method
navigate_to_thread
Navigate to an existing conversation thread.
src/chatgpt/client.py:396
Method
new_chat
Start a new conversation. Strategy order: 1. SPA button click (avoids DNS issues, preserves browser state) 2. JavaScript loca
src/chatgpt/client.py:277
Function
new_thread
Start a new conversation and send the first message.
src/api/routes.py:115
Function
on_console
(msg)
scripts/test_console_errors.py:18
Method
on_console
(msg)
src/chatgpt/client.py:75
Function
on_frame_navigated
Re-inject stealth JS when the main frame navigates.
src/browser/stealth.py:65
Method
on_input_submitted
(self, event: Input.Submitted)
src/cli/app.py:344
Method
on_key
(self, _: object)
src/cli/app.py:231
Method
on_mount
(self)
src/cli/app.py:187
Method
on_mount
(self)
src/cli/app.py:228
Method
on_mount
(self)
src/cli/app.py:278
Method
on_mount
(self)
src/cli/app.py:663
Function
on_new_page
Inject stealth into new pages and attach navigation listener.
src/browser/stealth.py:70
Method
on_page_error
(error)
src/chatgpt/client.py:81
Function
on_pageerror
(error)
scripts/test_console_errors.py:27
Function
on_request
(req)
scripts/test_input_methods.py:81
Method
on_request
(request)
src/chatgpt/client.py:49
Method
on_request_failed
(request)
src/chatgpt/client.py:65
Method
on_response
(response)
src/chatgpt/client.py:57
Method
on_websocket
(ws)
src/chatgpt/client.py:84
Method
page
Get the active page. Raises if browser not started.
src/browser/manager.py:356
Method
page
(self)
src/chatgpt/client.py:98
Method
page
(self)
src/claude/client.py:46
Function
reverse_string
Reverse the input string.
scripts/test_langchain_tools.py:79
Function
search_wikipedia
Return a fake Wikipedia summary for the query.
scripts/test_langchain_tools.py:66
Method
send_message
Send a message to ChatGPT and wait for the complete response. Args: text: The message text to send. image_pa
src/chatgpt/client.py:103
Function
skip
(msg: str)
scripts/test_responses_api.py:79
Function
status
Health check — returns login status and current thread.
src/api/routes.py:156
Function
test_10_error_no_auth
Error case: missing auth token should return 401.
scripts/test_responses_api.py:555
Function
test_11_metadata_passthrough
Non-streaming: metadata and previous_response_id are accepted and echoed.
scripts/test_responses_api.py:572
Function
test_12_multi_message_conversation
Non-streaming: multi-turn conversation in input array.
scripts/test_responses_api.py:592
Function
test_1_basic_image_generation
Test 1: Generate a single image via raw HTTP request (b64_json).
scripts/test_image_generation.py:78
Function
test_1_codex_simple_question
Codex CLI: simple coding question via streaming (no tools needed).
scripts/test_codex_cli.py:198
Function
test_1_string_input
Non-streaming: simple string input.
scripts/test_responses_api.py:219
Function
test_2_codex_tool_call_shell
Codex CLI: model should call the shell tool for a system task.
scripts/test_codex_cli.py:240
Function
test_2_message_array_input
Non-streaming: message array input (role + content).
scripts/test_responses_api.py:249
Function
test_2_save_generated_image
Test 2: Generate an image with a different prompt and verify save.
scripts/test_image_generation.py:135
Function
test_3_codex_full_tool_loop
Codex CLI: full tool loop. Turn 1: User asks → model calls shell tool Turn 2: We send function_call_output → model gives final answer
scripts/test_codex_cli.py:279
Function
test_3_instructions
Non-streaming: instructions field (system prompt).
scripts/test_responses_api.py:270
Function
test_3_url_format
Test 3: Generate an image with response_format='url'.
scripts/test_image_generation.py:181
Function
test_4_codex_apply_patch_tool
Codex CLI: model calls apply_patch to edit a file.
scripts/test_codex_cli.py:352
Function
test_4_developer_role
Non-streaming: developer role in input (should map to system).
scripts/test_responses_api.py:289
Function
test_4_openai_sdk
Test 4: Use the official OpenAI Python SDK.
scripts/test_image_generation.py:228
Function
test_5_codex_streaming_tool_call
Codex CLI: streaming SSE events for a tool call response.
scripts/test_codex_cli.py:381
Function
test_5_input_text_content_parts
Non-streaming: input with content parts using input_text type.
scripts/test_responses_api.py:308
Function
test_6_codex_multiple_tools
Codex CLI: both shell and apply_patch tools available.
scripts/test_codex_cli.py:443
Function
test_6_streaming_event_sequence
Streaming: validate complete SSE event sequence.
scripts/test_responses_api.py:331
Function
test_7_codex_tool_choice_none
Codex CLI: tool_choice=none forces text response even with tools defined.
scripts/test_codex_cli.py:475
Function
test_7_streaming_event_content
Streaming: validate individual event payloads.
scripts/test_responses_api.py:397
Function
test_8_codex_error_tool_output
Codex CLI: function_call_output with error — model should handle gracefully.
scripts/test_codex_cli.py:502
Function
test_8_tools_definition
Non-streaming: tools are accepted and echoed in flat format.
scripts/test_responses_api.py:487
Function
test_9_error_empty_input
Error case: empty input should return 400.
scripts/test_responses_api.py:539
Function
thinking_pause
Simulate a 'thinking' pause before the user starts typing.
src/browser/human.py:160
Method
watch_frame
(self, frame: int)
src/cli/app.py:193
Function
weather_forecast
Return a fake weather forecast for a city and date.
scripts/test_langchain_tools.py:84
← previous
201–289 of 289, ranked by callers