From ae3be3002a2fea661caa5991c75ba2e6f9fcf362 Mon Sep 17 00:00:00 2001 From: Anant Dole Date: Wed, 5 Jun 2024 10:24:25 +0200 Subject: [PATCH] Pushing minor fix to ai module replace data with config --- docs/framework/ai-module.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/framework/ai-module.mdx b/docs/framework/ai-module.mdx index a7d2f7997..3a74f48d3 100644 --- a/docs/framework/ai-module.mdx +++ b/docs/framework/ai-module.mdx @@ -98,25 +98,25 @@ for chunk in conversation.stream_complete(): ``` -Instance-wide configuration parameters can be complemented or overriden on individual call's level, if a `data` dictionary is provided to the method: +Instance-wide configuration parameters can be complemented or overriden on individual call's level, if a `config` dictionary is provided to the method: ```python # Overriding configuration for a specific call -response = conversation.complete(data={'max_tokens': 200, 'temperature': 0.5}) +response = conversation.complete(config={'max_tokens': 200, 'temperature': 0.5}) ``` ## Text completions without a conversation state -These `complete` and `stream_complete` methods are designed for one-off text completions without the need to manage a conversation state. They return the model's response as a string. Each function accepts a `data` dictionary allowing call-specific configurations. +These `complete` and `stream_complete` methods are designed for one-off text completions without the need to manage a conversation state. They return the model's response as a string. Each function accepts a `config` dictionary allowing call-specific configurations. ```python complete # Using `complete` for a single completion -text_response = complete("Explore the benefits of AI.", data={'temperature': 0.3}) +text_response = complete("Explore the benefits of AI.", config={'temperature': 0.3}) print("Completion:", text_response) ``` ```python stream_complete # Using `stream_complete` for streamed text completions -for text_chunk in stream_complete("Explore the benefits of AI.", data={'temperature': 0.3}): +for text_chunk in stream_complete("Explore the benefits of AI.", config={'temperature': 0.3}): print("Streamed Text:", text_chunk) ```