Go is well-suited for serverless applications due to its simple deployment, fast startup times, and low memory usage. This GitHub repository provides examples of how to build Azure Functions with Go that make use of these Azure Cosmos DB integrations.
-
Get started easily: A function that gets triggered by changes in a Cosmos DB container and simply logs the raw Azure Functions event payload and the Cosmos DB document. You can run the function and also test it with Cosmos DB locally, thanks to the Cosmos DB emulator and Azure Functions Core Tools.
-
Embeddings generator function: Creates vector embeddings for the documents in the Cosmos DB container using Azure OpenAI and stores the embeddings back in the container. This is useful for building applications that require semantic search or other generative AI applications.