From 68cf71955d466c1cd844ec017e58846aba2ef5dc Mon Sep 17 00:00:00 2001 From: Rene Hexel Date: Sat, 25 May 2024 15:21:22 +1000 Subject: [PATCH] Update context when generating a response. --- Sources/LangChain/llms/Ollama.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/LangChain/llms/Ollama.swift b/Sources/LangChain/llms/Ollama.swift index 05e56b3..955325c 100644 --- a/Sources/LangChain/llms/Ollama.swift +++ b/Sources/LangChain/llms/Ollama.swift @@ -100,6 +100,7 @@ public class Ollama: LLM { return LLMResult() } let llmResponse = try JSONDecoder().decode(GenerateResponse.self, from: data) + context = llmResponse.context return LLMResult(llm_output: llmResponse.response) }