{"id":20984475,"url":"https://github.com/pycui/universal-api","last_synced_at":"2025-05-14T17:30:53.356Z","repository":{"id":236728497,"uuid":"793040943","full_name":"pycui/universal-api","owner":"pycui","description":"Define and implement any functions on the fly with LLMs","archived":false,"fork":false,"pushed_at":"2024-05-02T21:47:20.000Z","size":9,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T20:53:36.167Z","etag":null,"topics":["gpt","llm","openai","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/pycui.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-04-28T09:01:16.000Z","updated_at":"2025-03-21T08:49:16.000Z","dependencies_parsed_at":"2024-05-02T22:51:05.125Z","dependency_job_id":null,"html_url":"https://github.com/pycui/universal-api","commit_stats":null,"previous_names":["pycui/universal-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycui%2Funiversal-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycui%2Funiversal-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycui%2Funiversal-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycui%2Funiversal-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pycui","download_url":"https://codeload.github.com/pycui/universal-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254194767,"owners_count":22030428,"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":["gpt","llm","openai","python"],"created_at":"2024-11-19T05:53:37.705Z","updated_at":"2025-05-14T17:30:48.339Z","avatar_url":"https://github.com/pycui.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal API\n\n*Don't know how to implement a function? Let Universal API help you on the fly!*\n\nThis is a non-serious library that can implement any functions on the fly using LLMs. To use it, simply call a function with a descriptive name and parameters, and it will be defined, implemented and called at runtime. Generated functions are cached so you don't pay for things that are already implemented.\n\n## Usage\n\n```python\napi = UniversalAPI()\n# Start to call arbitrary functions \nprint(api.sort([3, 2, 1])) # returns [1, 2, 3]\nprint(api.sort([4, 3, 2, 1])) # returns [1, 2, 3, 4] using cached implementation\nprint(api.sort([1, 2, 3], reverse=True)) # returns [3, 2, 1]\nprint(api.add(1, 2)) # returns 3\nprint(api.reverse('hello')) # returns 'olleh'\napi.fizzbuzz(15) # prints the fizzbuzz sequence up to 15\napi.print_picachu() # prints an ASCII art of Picachu\n```\n\n## Warning\nThis library will execute unverified code in your local machine. It's **NOT** safe to run in production (or really, any serious environment).\n\n## Notes\nBy default this library uses OpenAI GPT API. You can modify environment variables like `OPENAI_BASE_URL` to use other LLM endpoints (e.g. Anyscale Endpoint), which allows you to run on other models like the LLaMa series. It's also possible to use local LLMs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycui%2Funiversal-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycui%2Funiversal-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycui%2Funiversal-api/lists"}