{"id":15823933,"url":"https://github.com/stefh/openai","last_synced_at":"2025-10-16T09:40:36.094Z","repository":{"id":153665536,"uuid":"629655161","full_name":"StefH/OpenAI","owner":"StefH","description":"OpenAI related projects","archived":false,"fork":false,"pushed_at":"2023-10-10T15:18:55.000Z","size":3578,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T13:08:16.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StefH.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}},"created_at":"2023-04-18T18:54:41.000Z","updated_at":"2023-12-20T05:31:26.000Z","dependencies_parsed_at":"2023-09-22T10:40:29.188Z","dependency_job_id":"26b0fec6-3018-4f6b-9a97-b2e99e712410","html_url":"https://github.com/StefH/OpenAI","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"b0c82b551e9a4c25be6a226e7d9c834279aba01a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FOpenAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FOpenAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FOpenAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FOpenAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefH","download_url":"https://codeload.github.com/StefH/OpenAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243674655,"owners_count":20329136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-10-05T08:24:11.887Z","updated_at":"2025-10-16T09:40:36.071Z","avatar_url":"https://github.com/StefH.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI\nOpenAI related projects...\n\n## OpenAI.Polly\nThis is an extension for the [OpenAI](https://github.com/OkGoDoIt/OpenAI-API-dotnet) project: a C#/.NET SDK for accessing the OpenAI GPT-3 API, ChatGPT, and DALL-E 2.\n\n[Polly](https://github.com/App-vNext/Polly) is used to handle exceptions like:\n\n```\nUnhandled exception. System.Net.Http.HttpRequestException: Error at embeddings (https://api.openai.com/v1/embeddings) with HTTP status code: TooManyRequests. Content: {\n    \"error\": {\n        \"message\": \"Rate limit reached for default-global-with-image-limits in organization org-*** on requests per min. Limit: 60 / min. Please try again in 1s. Contact support@openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.\",\n        \"type\": \"requests\",\n        \"param\": null,\n        \"code\": null\n    }\n}\n```\n\n### Usage\n```csharp\nIOpenAIAPI openAiAPI = new OpenAIAPI(\"Your OpenAI API-Key\", \"Your Organization ID\");\nfloat[] embeddings = await openAiAPI.Embeddings.WithRetry(embeddings =\u003e embeddings.GetEmbeddingsAsync(\"What is a cat?\"));\n```\n\n### Logging using Dependency Injection\nIf you want to use a logger to log these exceptions, use the following code during your Dependency Injection configuration phase:\n\n```csharp\nvar serviceProvider = ...; // The service provider you use for Dependency Injection\n\nserviceProvider.UseOpenAIWithPolly();\n```\n\nNote that these exceptions are logged as `Debug` level.\n\n## :books:\nSee also https://mstack.nl/blogs/20230623-chatgpt-question-pdf-document/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fopenai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefh%2Fopenai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fopenai/lists"}