# CreateCachedContextRequestKt

# CreateCachedContextRequestKt


```
public final class CreateCachedContextRequestKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/CreateCachedContextRequest` | `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/CreateCachedContextRequestKt#createCachedContextRequest(kotlin.String,com.google.mlkit.genai.prompt.PromptPrefix)( @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html name, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/PromptPrefix promptPrefix )` Helper method to construct a `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/CreateCachedContextRequest`. |

## Public methods

### createCachedContextRequest

```
public static final @NonNull CreateCachedContextRequest createCachedContextRequest(
    @NonNull String name,
    @NonNull PromptPrefix promptPrefix
)
```

Helper method to construct a `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/CreateCachedContextRequest`.

Example Usage:

```
createCachedContextRequest("my_cache", PromptPrefix("Repeat 3 times: "))
```