Surface Duo Blog

Build great Android experiences, from AI to foldable and large-screens.

Latest posts

Tokenizer visualization for the JSON system and user message that makes up the earlier screenshot for the question "what sessions are on now". The data uses 166 tokens.
Craig Dunn
Craig Dunn
Aug 24, 2023

OpenAI tokens and limits

Hello prompt engineers, The Jetchat demo that we’ve been covering in this blog series uses the OpenAI Chat API, and in each blog post where we add ...

2
2
A friendly message in error scenarios
Craig Dunn
Craig Dunn
Aug 17, 2023

Prompt engineering tips

Hello prompt engineers, We’ve been sharing a lot of OpenAI content the last few months, and because each blog post typically focuses on a specific ...

0
1
AI chat answering questions using generated SQL
Craig Dunn
Craig Dunn
Aug 10, 2023

Dynamic Sqlite queries with OpenAI chat functions

Hello prompt engineers, Previous blogs explained how to add droidcon session favorites to a database and also cache the embedding vectors in a ...

0
0
Screenshot of vector array of doubles
Craig Dunn
Craig Dunn
Aug 3, 2023

Embedding vector caching (redux)

Hello prompt engineers, Earlier this year I tried to create a hardcoded cache of embedding vectors, only to be thwarted by the limitations of Kotlin...

1
0
Save session using chat
Craig Dunn
Craig Dunn
Jul 27, 2023

Chat memory with OpenAI functions

Hello prompt engineers, We first introduced OpenAI chat functions with a weather service and then a time-based conference sessions query. Both...

0
0
chat question "what's next" and answer from model
Craig Dunn
Craig Dunn
Jul 20, 2023

Combining OpenAI function calls with embeddings

Hello prompt engineers, Last week’s post introduced the OpenAI chat function calling to implement a live weather response. This week, we’ll look ...

0
0
Chat conversation asking for a weather report and providing a forecast
Craig Dunn
Craig Dunn
Jul 13, 2023

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 ...

0
0
Examples of AI chat with image and text
Parker Schroeder
Parker Schroeder
Jul 6, 2023

Multimodal Augmented Inputs in LLMs using Azure Cognitive Services

Hello AI enthusiasts, This week, we’ll be talking about how you can use Azure Cognitive Services to enhance the types of inputs your Android AI ...

0
1
Screenshot of vector array of doubles
Craig Dunn
Craig Dunn
Jun 29, 2023

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...

0
0