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
↓ 1 callers
Method
_click_send
Try to click the send button using selector fallbacks.
src/chatgpt/client.py:571
↓ 1 callers
Method
_click_send
Try to click the send button using selector fallbacks.
src/claude/client.py:243
↓ 1 callers
Function
_count_copy_buttons
Count assistant turns that currently expose a copy button.
src/chatgpt/detector.py:205
↓ 1 callers
Method
_dispatch_command
(self, cmd: str, args: str)
src/cli/app.py:408
↓ 1 callers
Method
_do_send
(self, text: str, thinking: ThinkingIndicator)
src/cli/app.py:372
↓ 1 callers
Method
_export_command
(self, filename: str)
src/cli/app.py:553
↓ 1 callers
Function
_extract_file_attachments
Extract file attachments from message content. Supported content part format: {"type": "file", "file": {"filename": "test.pdf", "data"
src/api/openai_routes.py:185
↓ 1 callers
Method
_extract_image_turn_text
Extract any text content from the latest turn (for image responses). Image turns may contain a title/description like: "Crea
src/chatgpt/client.py:440
↓ 1 callers
Function
_extract_image_urls
Extract image URLs from message content (OpenAI vision format).
src/api/openai_routes.py:168
↓ 1 callers
Function
_extract_json_object
Extract a JSON object containing *anchor* key from *text*. Uses two strategies: 1. Look inside markdown code blocks (```json ... ```)
src/api/openai_routes.py:493
↓ 1 callers
Method
_extract_thread_id
Extract the thread/conversation ID from the current URL.
src/chatgpt/client.py:668
↓ 1 callers
Function
_extract_via_dom
Fallback extraction: innerText from latest assistant turn only.
src/chatgpt/detector.py:600
↓ 1 callers
Function
_extract_via_dom
Fallback extraction: innerText from latest assistant turn only.
src/claude/detector.py:443
↓ 1 callers
Function
_file_to_base64
Read any file and return its base64-encoded content.
scripts/test_langchain_tools.py:112
↓ 1 callers
Function
_find_test_files
Return test files (non-image) from the downloads directory.
scripts/test_langchain_tools.py:127
↓ 1 callers
Function
_get_model_id
Return model ID based on active provider.
src/api/openai_routes.py:126
↓ 1 callers
Method
_go
(self)
src/cli/app.py:234
↓ 1 callers
Function
_resolve_domains_for_chrome
Pre-resolve key domains via the OS and return a --host-resolver-rules string for Chrome. Chrome's built-in DNS client (even with --disab
src/browser/manager.py:24
↓ 1 callers
Function
_responses_input_to_messages
Convert Responses API `input` (string or item array) into a list of ChatMessage objects compatible with our existing _build_prompt(). Ha
src/api/openai_routes.py:899
↓ 1 callers
Function
_responses_tools_to_chat_tools
Convert flat Responses API tool definitions to nested Chat Completions ToolDefinition format so we can reuse _build_tool_system_prompt().
src/api/openai_routes.py:990
↓ 1 callers
Method
_send
(self, text: str)
src/cli/app.py:357
↓ 1 callers
Method
_set_model
(self, name: str)
src/cli/app.py:533
↓ 1 callers
Method
_set_system
(self, text: str)
src/cli/app.py:515
↓ 1 callers
Method
_setup_network_logging
Monitor network requests, WebSockets, and JS errors for debugging.
src/chatgpt/client.py:44
↓ 1 callers
Method
_show_help
(self)
src/cli/app.py:433
↓ 1 callers
Method
_show_history
(self)
src/cli/app.py:490
↓ 1 callers
Method
_show_status
(self)
src/cli/app.py:458
↓ 1 callers
Method
_show_welcome
(self)
src/cli/app.py:312
↓ 1 callers
Function
_stream_response_events
Yield SSE events for a streaming Responses API call. Since the browser backend doesn't truly stream, we emit the full response as a burs
src/api/openai_routes.py:1081
↓ 1 callers
Method
_upload_files
Upload files (images, PDFs, docs, etc.) to ChatGPT's input area. ChatGPT has a hidden <input type="file"> that accepts various file
src/chatgpt/client.py:612
↓ 1 callers
Method
_upload_files
Upload files to Claude's input area.
src/claude/client.py:252
↓ 1 callers
Function
_wait_for_copy_button
Wait for copy button to appear on the latest assistant turn.
src/claude/detector.py:290
↓ 1 callers
Function
_wait_for_copy_button_or_image
Wait for either copy-button readiness or generated image on the latest turn. Returns "copy", "image", or None if timed out.
src/chatgpt/detector.py:342
↓ 1 callers
Function
_wait_for_streaming_complete
Wait for Claude's data-is-streaming attribute to become "false". This is the primary and most reliable completion signal for Claude.
src/claude/detector.py:251
↓ 1 callers
Function
_wait_via_stop_button
Wait for stop button appear -> disappear cycle.
src/chatgpt/detector.py:437
↓ 1 callers
Function
_wait_via_text_stability
Last resort: poll latest assistant-turn text and wait until stable. If previous_turn_signature is provided, ignores stabilization on that ol
src/chatgpt/detector.py:467
↓ 1 callers
Function
_wait_via_text_stability
Last resort: poll latest assistant-turn text and wait until stable.
src/claude/detector.py:321
↓ 1 callers
Method
action_clear_chat
(self)
src/cli/app.py:606
↓ 1 callers
Method
action_new_chat
(self)
src/cli/app.py:592
↓ 1 callers
Function
apply_stealth
Apply stealth patches to a browser context. In Docker: uses page.evaluate() + navigation listener (safe for DNS). Outside Docker: uses t
src/browser/stealth.py:41
↓ 1 callers
Method
apply_stealth_patches
Apply stealth patches to the browser context. Must be called AFTER the first page navigation, not before. In Docker containe
src/browser/manager.py:343
↓ 1 callers
Function
assert_type
(label, value, expected_type)
scripts/test_codex_cli.py:139
↓ 1 callers
Function
connect_to_browser
Connect to the already-running browser via CDP.
scripts/test_input_methods.py:26
↓ 1 callers
Function
detect_images_in_response
Check the last conversation turn for generated images. ChatGPT DALL-E image responses do NOT use data-message-author-role. Instead, imag
src/chatgpt/image_handler.py:35
↓ 1 callers
Function
download_image
Download an image from a URL using the browser's fetch API. Uses the browser context so cookies/auth are preserved (required for OpenAI-
src/chatgpt/image_handler.py:144
↓ 1 callers
Function
ensure_logged_in
Check if the user is logged in. If not, guide them through login. This replaces the need to manually run `scripts/first_login.py`. Opens
src/browser/auto_login.py:19
↓ 1 callers
Function
extract_images_from_response
Full pipeline: detect images in the last response, download them, and return ImageInfo objects with both URLs and local paths.
src/chatgpt/image_handler.py:235
↓ 1 callers
Method
get_captured
Return all captured request entries.
src/network_recorder.py:59
↓ 1 callers
Method
get_current_thread_url
Get the current page URL (contains thread ID if in a conversation).
src/claude/client.py:187
↓ 1 callers
Function
get_latest_assistant_turn_signature
Return signature for the latest assistant turn, if available.
src/chatgpt/detector.py:167
↓ 1 callers
Function
get_latest_assistant_turn_signature
Return signature for the latest assistant turn, if available.
src/claude/detector.py:130
↓ 1 callers
Method
list_threads
Scrape the sidebar for recent conversation threads. Returns a list of dicts: [{id, title, url}, ...]
src/claude/client.py:193
↓ 1 callers
Function
main
Entry point.
src/cli/app.py:688
↓ 1 callers
Function
main
()
scripts/check_page_state.py:6
↓ 1 callers
Function
main
()
scripts/test_insert_text.py:9
↓ 1 callers
Function
main
()
scripts/diagnose_chatgpt.py:10
↓ 1 callers
Function
main
()
scripts/test_multi_turn.py:123
↓ 1 callers
Function
main
()
scripts/test_input_methods.py:284
↓ 1 callers
Function
main
()
scripts/test_console_errors.py:12
↓ 1 callers
Function
main
(message: str, new_chat: bool, observe: bool)
scripts/test_phase1.py:47
↓ 1 callers
Function
main
()
scripts/test_robust.py:113
↓ 1 callers
Function
main
()
scripts/test_responses_api.py:614
↓ 1 callers
Function
main
()
scripts/first_login.py:26
↓ 1 callers
Function
main
()
scripts/test_langchain_tools.py:526
↓ 1 callers
Function
main
()
scripts/test_images.py:103
↓ 1 callers
Function
main
()
scripts/test_image_generation.py:282
↓ 1 callers
Function
main
()
scripts/test_codex_cli.py:547
↓ 1 callers
Function
method_keyboard_type
Method 1: keyboard.type() — sends keyDown/keyPress/keyUp per char.
scripts/test_input_methods.py:102
↓ 1 callers
Method
navigate_to_thread
Navigate to an existing conversation thread.
src/claude/client.py:179
↓ 1 callers
Function
print_result
(idx: int, msg: str, response: str, time_ms: int, thread_id: str)
scripts/test_multi_turn.py:63
↓ 1 callers
Function
set_client
Called by server.py to inject the client instance.
src/api/routes.py:43
↓ 1 callers
Function
set_openai_client
Called by server.py to inject the client.
src/api/openai_routes.py:133
↓ 1 callers
Method
start
Start recording network requests and responses.
src/network_recorder.py:24
↓ 1 callers
Method
stop
Stop recording (note: Playwright doesn't support removing listeners easily).
src/network_recorder.py:33
↓ 1 callers
Function
suppress_console_logs
Disable all console log handlers (call before any setup_logging).
src/log.py:16
↓ 1 callers
Function
test_add_numbers_tool
Test tool calling with add_numbers.
scripts/test_langchain_tools.py:225
↓ 1 callers
Function
test_complex_tool_calls
Test complex multi-tool scenarios.
scripts/test_langchain_tools.py:279
↓ 1 callers
Function
test_file_attachment
Test sending non-image file attachments (e.g. PDF).
scripts/test_langchain_tools.py:446
↓ 1 callers
Function
test_image_input
Test sending images via the OpenAI vision content format.
scripts/test_langchain_tools.py:356
↓ 1 callers
Function
test_method
Test a single input method: type text, check state, click send, check network.
scripts/test_input_methods.py:221
↓ 1 callers
Function
test_models_endpoint
Test that /v1/models returns our model.
scripts/test_langchain_tools.py:137
↓ 1 callers
Function
test_simple_chat
Test a simple chat without tools.
scripts/test_langchain_tools.py:149
↓ 1 callers
Function
test_tool_calling
Test tool/function calling with get_current_time.
scripts/test_langchain_tools.py:167
↓ 1 callers
Function
validate
Validate test result. Returns (passed, reason).
scripts/test_images.py:69
↓ 1 callers
Function
validate_response
Check if the response meets expectations. Returns (passed, reason).
scripts/test_robust.py:94
↓ 1 callers
Function
validate_usage
Validate usage object.
scripts/test_responses_api.py:204
↓ 1 callers
Function
wait_for_network_call
Wait for a backend-api/conversation POST and return True if seen.
scripts/test_input_methods.py:77
Method
__call__
(self, scope: Scope, receive: Receive, send: Send)
src/api/server.py:125
Method
__init__
(self, page: Page)
src/dom_observer.py:19
Method
__init__
(self, page: Page)
src/network_recorder.py:19
Method
__init__
(self)
src/browser/manager.py:185
Method
__init__
(self, page: Page)
src/chatgpt/client.py:40
Method
__init__
(self, text: str, turn: int)
src/cli/app.py:108
Method
__init__
(self, text: str, model: str, time_ms: int)
src/cli/app.py:133
Method
__init__
(self, text: str)
src/cli/app.py:164
Method
__init__
(self, app: ASGIApp)
src/api/server.py:122
Method
__init__
(self, page: Page)
src/claude/client.py:42
Method
_clear_dns_cache
Clear Chrome's in-memory DNS host cache via chrome://net-internals.
src/browser/manager.py:278
Function
_detect_image_in_latest_turn
Check if the newest assistant turn (not previous turn) contains an image.
src/chatgpt/detector.py:195
Method
_on_console
Handle browser console messages from our observer.
src/dom_observer.py:73
← previous
next →
101–200 of 289, ranked by callers