{"id":18434551,"url":"https://github.com/dallinhuff/openai4s","last_synced_at":"2025-04-14T08:23:26.888Z","repository":{"id":220024570,"uuid":"750493694","full_name":"dallinhuff/openai4s","owner":"dallinhuff","description":"Scala serialization/deserialization library for OpenAI REST API","archived":false,"fork":false,"pushed_at":"2024-02-05T09:12:09.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T10:14:52.537Z","etag":null,"topics":["openai","scala","typelevel"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/dallinhuff.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}},"created_at":"2024-01-30T18:45:51.000Z","updated_at":"2024-02-13T08:38:11.000Z","dependencies_parsed_at":"2024-02-05T10:47:54.064Z","dependency_job_id":null,"html_url":"https://github.com/dallinhuff/openai4s","commit_stats":null,"previous_names":["dallinhuff/openai4s"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dallinhuff%2Fopenai4s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dallinhuff%2Fopenai4s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dallinhuff%2Fopenai4s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dallinhuff%2Fopenai4s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dallinhuff","download_url":"https://codeload.github.com/dallinhuff/openai4s/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844264,"owners_count":21170542,"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":["openai","scala","typelevel"],"created_at":"2024-11-06T06:04:26.580Z","updated_at":"2025-04-14T08:23:26.858Z","avatar_url":"https://github.com/dallinhuff.png","language":"Scala","readme":"# openai4s (OpenAI For Scala)\n\nThis project aims to provide type-safe request \u0026 response bindings for OpenAI's public APIs.\n\nCurrently, bindings exist for the new [completions]() API, with more to come.\n\nFuture releases will include http clients for sending and receiving requests,\nbut for now this library is primarily concerned with providing safe serialization \u0026 deserialization\nof request bodies, where request handling can be handled by another library.\n\n## Installation\n\n#### sbt\n`com.dallinhuff %% openai4s % 0.1.1-SNAPSHOT`\n\n## Usage\n\n```scala\nimport com.dallinhuff.openai4s.completions.*\n\n//...\n\n// CreateChatCompletion and ChatCompletion have circe Codecs,\n// so you can serialize them in HTTP requests/responses using\n// whichever http client library you prefer\nval prompt = CreateChatCompletion(\n  model = \"gpt-3.5-turbo\",\n  messages = List(\n    Message.SystemMessage(\"you are a cranky old man who never tells jokes\"),\n    Message.UserMessage(\"tell me a joke please\")\n  ),\n  n = Some(2)\n)\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdallinhuff%2Fopenai4s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdallinhuff%2Fopenai4s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdallinhuff%2Fopenai4s/lists"}