MCPcopy Create free account

hub / github.com/GautamVhavle/CatGPT-Gateway / functions

Functions289 in github.com/GautamVhavle/CatGPT-Gateway

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
Methodaction_export
(self)
src/cli/app.py:616
Functionadd_numbers
Add two numbers together and return the result.
scripts/test_langchain_tools.py:61
Functioncalculate_expression
Evaluate a math expression (e.g., '7*8+3').
scripts/test_langchain_tools.py:71
Functionchat
Start an interactive CATGPT terminal session.
src/cli/app.py:673
Functionchat
Send a message in the current conversation.
src/api/routes.py:80
Functionchat_in_thread
Send a message in a specific thread. Navigates to it first.
src/api/routes.py:95
Methodchat_log
(self)
src/cli/app.py:307
Methodcompose
(self)
src/cli/app.py:114
Methodcompose
(self)
src/cli/app.py:140
Methodcompose
(self)
src/cli/app.py:168
Methodcompose
(self)
src/cli/app.py:181
Methodcompose
(self)
src/cli/app.py:216
Methodcompose
(self)
src/cli/app.py:294
Methodcontext
Get the browser context.
src/browser/manager.py:363
Functioncreate_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
Functioncreate_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
Functioncreate_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
Methodget_current_thread_url
Get the current page URL (contains thread ID if in a conversation).
src/chatgpt/client.py:404
Functionget_current_time
Get the current date and time. Returns ISO format datetime string.
scripts/test_langchain_tools.py:56
Functionget_stealth
Return the shared Stealth instance (for use with launch helpers).
src/browser/stealth.py:86
Functionhealthz
Unauthenticated health-check for Docker / load-balancers.
src/api/server.py:181
Functionlifespan
Startup: launch browser. Shutdown: close it.
src/api/server.py:40
Functionlist_models
List available models — returns our single browser-backed model.
src/api/openai_routes.py:609
Functionlist_threads
List recent conversation threads from the sidebar.
src/api/routes.py:134
Methodlist_threads
Scrape the sidebar for recent conversation threads. Returns a list of dicts: [{id, title, url}, ...]
src/chatgpt/client.py:410
Functionmethod_clipboard_paste
Method 2: Set clipboard and paste via Cmd+V.
scripts/test_input_methods.py:115
Functionmethod_dispatch_input_event
Method 4: Set innerHTML + dispatch input event.
scripts/test_input_methods.py:137
Functionmethod_exec_command
Method 5: document.execCommand('insertText') — fires proper input events.
scripts/test_input_methods.py:170
Functionmethod_fill
Method 3: Playwright's fill() — uses CDP Input.insertText.
scripts/test_input_methods.py:131
Functionmethod_react_native_setter
Method 6: Use React's internal value setter to update state.
scripts/test_input_methods.py:186
Functionmulti_arg_tool
Return the product of three numbers.
scripts/test_langchain_tools.py:89
Methodnavigate_to_thread
Navigate to an existing conversation thread.
src/chatgpt/client.py:396
Methodnew_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
Functionnew_thread
Start a new conversation and send the first message.
src/api/routes.py:115
Functionon_console
(msg)
scripts/test_console_errors.py:18
Methodon_console
(msg)
src/chatgpt/client.py:75
Functionon_frame_navigated
Re-inject stealth JS when the main frame navigates.
src/browser/stealth.py:65
Methodon_input_submitted
(self, event: Input.Submitted)
src/cli/app.py:344
Methodon_key
(self, _: object)
src/cli/app.py:231
Methodon_mount
(self)
src/cli/app.py:187
Methodon_mount
(self)
src/cli/app.py:228
Methodon_mount
(self)
src/cli/app.py:278
Methodon_mount
(self)
src/cli/app.py:663
Functionon_new_page
Inject stealth into new pages and attach navigation listener.
src/browser/stealth.py:70
Methodon_page_error
(error)
src/chatgpt/client.py:81
Functionon_pageerror
(error)
scripts/test_console_errors.py:27
Functionon_request
(req)
scripts/test_input_methods.py:81
Methodon_request
(request)
src/chatgpt/client.py:49
Methodon_request_failed
(request)
src/chatgpt/client.py:65
Methodon_response
(response)
src/chatgpt/client.py:57
Methodon_websocket
(ws)
src/chatgpt/client.py:84
Methodpage
Get the active page. Raises if browser not started.
src/browser/manager.py:356
Methodpage
(self)
src/chatgpt/client.py:98
Methodpage
(self)
src/claude/client.py:46
Functionreverse_string
Reverse the input string.
scripts/test_langchain_tools.py:79
Functionsearch_wikipedia
Return a fake Wikipedia summary for the query.
scripts/test_langchain_tools.py:66
Methodsend_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
Functionskip
(msg: str)
scripts/test_responses_api.py:79
Functionstatus
Health check — returns login status and current thread.
src/api/routes.py:156
Functiontest_10_error_no_auth
Error case: missing auth token should return 401.
scripts/test_responses_api.py:555
Functiontest_11_metadata_passthrough
Non-streaming: metadata and previous_response_id are accepted and echoed.
scripts/test_responses_api.py:572
Functiontest_12_multi_message_conversation
Non-streaming: multi-turn conversation in input array.
scripts/test_responses_api.py:592
Functiontest_1_basic_image_generation
Test 1: Generate a single image via raw HTTP request (b64_json).
scripts/test_image_generation.py:78
Functiontest_1_codex_simple_question
Codex CLI: simple coding question via streaming (no tools needed).
scripts/test_codex_cli.py:198
Functiontest_1_string_input
Non-streaming: simple string input.
scripts/test_responses_api.py:219
Functiontest_2_codex_tool_call_shell
Codex CLI: model should call the shell tool for a system task.
scripts/test_codex_cli.py:240
Functiontest_2_message_array_input
Non-streaming: message array input (role + content).
scripts/test_responses_api.py:249
Functiontest_2_save_generated_image
Test 2: Generate an image with a different prompt and verify save.
scripts/test_image_generation.py:135
Functiontest_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
Functiontest_3_instructions
Non-streaming: instructions field (system prompt).
scripts/test_responses_api.py:270
Functiontest_3_url_format
Test 3: Generate an image with response_format='url'.
scripts/test_image_generation.py:181
Functiontest_4_codex_apply_patch_tool
Codex CLI: model calls apply_patch to edit a file.
scripts/test_codex_cli.py:352
Functiontest_4_developer_role
Non-streaming: developer role in input (should map to system).
scripts/test_responses_api.py:289
Functiontest_4_openai_sdk
Test 4: Use the official OpenAI Python SDK.
scripts/test_image_generation.py:228
Functiontest_5_codex_streaming_tool_call
Codex CLI: streaming SSE events for a tool call response.
scripts/test_codex_cli.py:381
Functiontest_5_input_text_content_parts
Non-streaming: input with content parts using input_text type.
scripts/test_responses_api.py:308
Functiontest_6_codex_multiple_tools
Codex CLI: both shell and apply_patch tools available.
scripts/test_codex_cli.py:443
Functiontest_6_streaming_event_sequence
Streaming: validate complete SSE event sequence.
scripts/test_responses_api.py:331
Functiontest_7_codex_tool_choice_none
Codex CLI: tool_choice=none forces text response even with tools defined.
scripts/test_codex_cli.py:475
Functiontest_7_streaming_event_content
Streaming: validate individual event payloads.
scripts/test_responses_api.py:397
Functiontest_8_codex_error_tool_output
Codex CLI: function_call_output with error — model should handle gracefully.
scripts/test_codex_cli.py:502
Functiontest_8_tools_definition
Non-streaming: tools are accepted and echoed in flat format.
scripts/test_responses_api.py:487
Functiontest_9_error_empty_input
Error case: empty input should return 400.
scripts/test_responses_api.py:539
Functionthinking_pause
Simulate a 'thinking' pause before the user starts typing.
src/browser/human.py:160
Methodwatch_frame
(self, frame: int)
src/cli/app.py:193
Functionweather_forecast
Return a fake weather forecast for a city and date.
scripts/test_langchain_tools.py:84
← previous201–289 of 289, ranked by callers