{"id":23054975,"url":"https://github.com/appwrite-community/gpt-4o-function","last_synced_at":"2026-03-20T00:23:02.103Z","repository":{"id":239820002,"uuid":"800607567","full_name":"appwrite-community/gpt-4o-function","owner":"appwrite-community","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-17T16:14:54.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T21:54:53.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appwrite-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-14T16:49:19.000Z","updated_at":"2024-11-10T16:35:33.000Z","dependencies_parsed_at":"2024-05-17T17:31:34.132Z","dependency_job_id":"e840fc7d-d969-4f3b-a3d4-909735d3e57e","html_url":"https://github.com/appwrite-community/gpt-4o-function","commit_stats":null,"previous_names":["appwrite-community/gpt-4o-function"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/appwrite-community/gpt-4o-function","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite-community%2Fgpt-4o-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite-community%2Fgpt-4o-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite-community%2Fgpt-4o-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite-community%2Fgpt-4o-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appwrite-community","download_url":"https://codeload.github.com/appwrite-community/gpt-4o-function/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite-community%2Fgpt-4o-function/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29561783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T01:09:45.423Z","updated_at":"2026-02-17T23:02:36.527Z","avatar_url":"https://github.com/appwrite-community.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Node Prompt ChatGPT Function\n\nAsk question, and let OpenAI GPT-4o answer.\n\n## 🧰 Usage\n\n### GET /\n\nHTML form for interacting with the function.\n\n### POST /\n\nQuery the model for a completion.\n\n**Parameters**\n\n| Name         | Description                          | Location | Type               | Sample Value                  |\n| ------------ | ------------------------------------ | -------- | ------------------ | ----------------------------- |\n| Content-Type | The content type of the request body | Header   | `application/json` | N/A                           |\n| prompt       | Text to prompt the model             | Body     | String             | `Write a haiku about Mondays` |\n\nSample `200` Response:\n\nResponse from the model.\n\n```json\n{\n  \"ok\": true,\n  \"completion\": \"Monday's heavy weight, Dawning with a sigh of grey, Hopeful hearts await.\"\n}\n```\n\nSample `400` Response:\n\nResponse when the request body is missing.\n\n```json\n{\n  \"ok\": false,\n  \"error\": \"Missing body with a prompt.\"\n}\n```\n\nSample `500` Response:\n\nResponse when the model fails to respond.\n\n```json\n{\n  \"ok\": false,\n  \"error\": \"Failed to query model.\"\n}\n```\n\n## ⚙️ Configuration\n\n| Setting           | Value         |\n| ----------------- | ------------- |\n| Runtime           | Node (18.0)   |\n| Entrypoint        | `src/main.js` |\n| Build Commands    | `npm install` |\n| Permissions       | `any`         |\n| Timeout (Seconds) | 15            |\n\n## 🔒 Environment Variables\n\n### OPENAI_API_KEY\n\nA unique key used to authenticate with the OpenAI API. Please note that this is a paid service and you will be charged for each request made to the API. For more information, see the [OpenAI pricing page](https://openai.com/pricing/).\n\n| Question      | Answer                                                                      |\n| ------------- | --------------------------------------------------------------------------- |\n| Required      | Yes                                                                         |\n| Sample Value  | `sk-wzG...vcy`                                                              |\n| Documentation | [OpenAI Docs](https://platform.openai.com/docs/quickstart/add-your-api-key) |\n\n### OPENAI_MAX_TOKENS\n\nThe maximum number of tokens that the OpenAI response should contain. Be aware that OpenAI models read and write a maximum number of tokens per API call, which varies depending on the model. For GPT-3.5-turbo, the limit is 4096 tokens.\n\n| Question      | Answer                                                                                                        |\n| ------------- | ------------------------------------------------------------------------------------------------------------- |\n| Required      | No                                                                                                            |\n| Sample Value  | `512`                                                                                                         |\n| Documentation | [OpenAI: What are tokens?](https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappwrite-community%2Fgpt-4o-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappwrite-community%2Fgpt-4o-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappwrite-community%2Fgpt-4o-function/lists"}