{"id":15066901,"url":"https://github.com/functioncalling/functioncalling-googlegenerativeai","last_synced_at":"2026-01-03T04:57:59.332Z","repository":{"id":256863828,"uuid":"856657477","full_name":"FunctionCalling/FunctionCalling-GoogleGenerativeAI","owner":"FunctionCalling","description":"Easy to use your Swift native functions for function calling with GoogleGenerativeAI.","archived":false,"fork":false,"pushed_at":"2024-09-20T07:23:20.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T00:13:14.541Z","etag":null,"topics":["functioncalling","gemini","google","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/FunctionCalling.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-09-13T00:53:52.000Z","updated_at":"2024-09-20T07:22:58.000Z","dependencies_parsed_at":"2024-09-13T13:36:48.991Z","dependency_job_id":"d06afcea-308c-4872-a9a9-685df6452240","html_url":"https://github.com/FunctionCalling/FunctionCalling-GoogleGenerativeAI","commit_stats":null,"previous_names":["fumito-ito/functioncalling-googlegenerativeai","functioncalling/functioncalling-googlegenerativeai"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FunctionCalling%2FFunctionCalling-GoogleGenerativeAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FunctionCalling%2FFunctionCalling-GoogleGenerativeAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FunctionCalling%2FFunctionCalling-GoogleGenerativeAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FunctionCalling%2FFunctionCalling-GoogleGenerativeAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FunctionCalling","download_url":"https://codeload.github.com/FunctionCalling/FunctionCalling-GoogleGenerativeAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822311,"owners_count":20353496,"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":["functioncalling","gemini","google","swift"],"created_at":"2024-09-25T01:13:44.267Z","updated_at":"2026-01-03T04:57:59.326Z","avatar_url":"https://github.com/FunctionCalling.png","language":"Swift","readme":"# ⚠️ google-generative-ai has become deprecated. The same goes for this library. Please use [FunctionCalling-FirebaseVertexAI](https://github.com/FunctionCalling/FunctionCalling-FirebaseVertexAI)\n\n\u003e [Deprecated] Google AI Swift SDK for the Gemini API\n\u003e \n\u003e With Gemini 2.0, we took the chance to create a unified SDK for mobile developers who want to use Google's GenAI models (Gemini, Veo, Imagen, etc). As part of that process, we took all of the feedback from this SDK and what developers like about other SDKs in the ecosystem to direclty work with the Firebase SDK. We don't plan to add anything to this SDK or making any further changes. We know how disruptive an SDK change can be and don't take this change lightly, but our goal is to create an extremely simple and clear path for developers to build with our models so it felt necessary to make this change.\n\n# FunctionCalling-GoogleGenerativeAI\n\nThis library simplifies the integration of the [FunctionCalling](https://github.com/fumito-ito/FunctionCalling) macro into [GoogleGenerativeAI](https://github.com/google-gemini/generative-ai-swift). By using this library, you can directly generate `Tool` objects from Swift native functions, which can then be specified as FunctionCalling when invoking VertexAI.\n\n## Usage\n\n```swift\n\nimport FunctionCalling\nimport FunctionCalling_GoogleGenerativeAI\nimport GoogleGenerativeAI\n\n// MARK: Declare the container and functions for the tools to be called from FunctionCalling.\n\n@FunctionCalling(service: .llamaOrGemini)\nstruct MyFunctionTools {\n    @CallableFunction\n    /// Get the current stock price for a given ticker symbol\n    ///\n    /// - Parameter: The stock ticker symbol, e.g. GOOG for Google Inc.\n    func getStockPrice(ticker: String) async throws -\u003e String {\n        // code to return stock price of passed ticker\n    }\n}\n\n// MARK: You can directly pass the tools generated from objects to the model in GoogleGenerativeAI.\n\nlet model = GenerativeModel(\n    modelName: \"gemini-1.5-flash\",\n    tools: MyFunctionTools().googleGenerativeAITools\n)\n```\n\n## Installation\n\n### Swift Package Manager\n\n```\nlet package = Package(\n    name: \"MyPackage\",\n    products: [...],\n    targets: [\n        .target(\n            \"YouAppModule\",\n            dependencies: [\n                .product(name: \"FunctionCalling-GoogleGenerativeAI\", package: \"FunctionCalling-GoogleGenerativeAI\")\n            ]\n        )\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/FunctionCalling/FunctionCalling-GoogleGenerativeAI\", from: \"0.1.0\")\n    ]\n)\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.\n\n## License\n\nThe MIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctioncalling%2Ffunctioncalling-googlegenerativeai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunctioncalling%2Ffunctioncalling-googlegenerativeai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctioncalling%2Ffunctioncalling-googlegenerativeai/lists"}