# IChatGptClient.GetConversationAsync method

Retrieves a chat conversation from the cache.

```csharp
public Task<IEnumerable<ChatGptMessage>> GetConversationAsync(Guid conversationId, 
    CancellationToken cancellationToken = default)
```

| parameter | description |
| --- | --- |
| conversationId | The unique identifier of the conversation. |
| cancellationToken | The token to monitor for cancellation requests. |

## Return Value

The message list of the conversation, or Empty if the Conversation Id does not exist.

## See Also

* class [ChatGptMessage](../../ChatGptNet.Models/ChatGptMessage.md)
* interface [IChatGptClient](../IChatGptClient.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
