Surface Duo Blog

OpenAI chat functions on Android

Hello prompt engineers, OpenAI recently announced a new feature – function calling – that makes it easier to extend the chat API with external data and functionality. This post will walk through the code to implement a “chat function” in the JetchatAI sample app (discussed in earlier posts). Following the function ...

Embedding vector caching

Hello prompt engineers, A few weeks ago I added a custom datastore (the droidcon SF schedule) to the Jetchat OpenAI chat sample. One of the ‘hacks’ I used was generating the embeddings used for similarity comparisons on every startup and caching in memory: This results in ~70 web requests each time, plus the (albeit low...

Announcing FoldAwareColumn in Accompanist Adaptive

Hello Jetpack Compose developers, This week, we’re super excited to announce the release of ! This new component is part of Accompanist, Google’s “sandbox” for experimental Jetpack Compose APIs. The Accompanist Adaptive library already contains the component, which we tested out late last year, so will be the second ...

JetchatAI gets smarter with embeddings

Hello prompt engineers, A few weeks ago we finished a series of posts building an AI chatbot using the Jetchat sample with OpenAI. The sample uses the chat and image endpoints, but has the same limitation as many LLMs, which is that its knowledge is limited to the training data (for example, anything after September 2021 is not ...

Improved navigation support in TwoPaneLayout

Hello Jetpack Compose developers, This week, we’re excited to announce an update to our TwoPaneLayout library! You can now use with destinations that accept navigation arguments. This new feature was originally suggested by two developers in our feedback forum, so special thanks to @tscholze and @Papes96 for staying ...

Microsoft Build 2023 recap

Hello mobile developers, Microsoft Build 2023 took place last week, with a big focus on AI technologies. You can find the complete catalog of sessions on the Build website, but we’ve selected a few sessions below that cover topics of interest for mobile developers. The age of AI These sessions cover some of the high-level ...

Blossoming love for Compose animation

Hello Jetpack Compose developers, Today we’ll be finishing up our blog series on animations in Jetpack Compose! This content was inspired by Nicole Terc’s Composable Sheep talk from droidcon NYC. Over the past two weeks, we covered some basics graphics, animation canvases, and basic animations. This week, we’ll polish ...

Blooming love for Compose animation

Hello Jetpack Compose developers, Today we’ll be continuing our blog series on animations in Jetpack Compose! This content was inspired by Nicole Terc’s Composable Sheep talk from droidcon NYC. More basic animations We’ll be continuing to use our method and composable to build animations in this post, so if you haven...

Budding love for compose animation

Hello Jetpack Compose developers, Last week, we did some Compose animation work to build a typing indicator in a chat app. For our next blog series, I’ll be diving into more animation topics with a project inspired by Nicole Terc’s Composable Sheep talk from droidcon NYC. Her composable sheep talk series inspired me to work on ...