From 19e1f72560e3f38de12ab8d4b9be8f0bcff57d16 Mon Sep 17 00:00:00 2001 From: Jan Philipp Harries Date: Thu, 15 Jun 2023 11:36:30 +0200 Subject: [PATCH] use function call argument to force function call --- example_segmentation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example_segmentation.py b/example_segmentation.py index dc1345d..fb44d01 100644 --- a/example_segmentation.py +++ b/example_segmentation.py @@ -58,14 +58,15 @@ def segment(data: str) -> MultiSearch: model="gpt-3.5-turbo-0613", temperature=0, functions=[MultiSearch.openai_schema], + function_call={"name": MultiSearch.openai_schema['name']}, messages=[ { "role": "system", - "content": "You must use the tool given to response.", + "content": "You are a helpful assistant.", }, { "role": "user", - "content": f"Consider the data below:\n{data} and segment it into multiple search queries. You must use `MultiStep` to do this.", + "content": f"Consider the data below:\n{data} and segment it into multiple search queries", }, ], max_tokens=1000,