Skip to main content

1. Instantiate Clients

Instantiate Clients for Freeplay and your LLM Provider

2. Fetch Prompt Template

Fetch prompt template from Freeplay

3. Format Prompt

format prompt including input variables and history

4. Call LLM

Call your LLM provider, history will be merged into your prompt and ready to pass through

5. Record Interaction

Record the interaction to Freeplay

6. Manage history

Determine what to include in conversation history over each turn. Append the select messages to an array

Examples