From ebc827256eea06b8a97ae90c6dc1b9c08503b231 Mon Sep 17 00:00:00 2001 From: Josh XT Date: Wed, 1 May 2024 18:30:47 -0400 Subject: [PATCH] Update params and prompt --- convertanything/__init__.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/convertanything/__init__.py b/convertanything/__init__.py index 458bfa4..c1e448f 100644 --- a/convertanything/__init__.py +++ b/convertanything/__init__.py @@ -26,7 +26,7 @@ def convertanything( description += f" (Enum values: {enum_values})" field_descriptions.append(description) schema = "\n".join(field_descriptions) - prompt = f"""Act as a JSON converter that converts any text into the desired JSON format based on the schema provided. Respond only with JSON in a properly formatted markdown code block, no explanations. + prompt = f"""Act as a JSON converter that converts any text into the desired JSON format based on the schema provided. Respond only with JSON in a properly formatted markdown code block, no explanations. Make your best assumptions based on data to try to fill in information to match the schema provided. **Reformat the following information into a structured format according to the schema provided:** ## Information: @@ -41,8 +41,8 @@ def convertanything( completion = openai.chat.completions.create( model=llm, messages=[{"role": "user", "content": prompt}], - temperature=0.3, - max_tokens=1024, + temperature=0.5, + max_tokens=4096, top_p=0.95, stream=False, ) diff --git a/setup.py b/setup.py index dfc48ee..375d0b5 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="convertanything", - version="0.0.9", + version="0.0.10", description="convertanything is a Python package that allows you to convert any text into a structured format according to the schema provided.", long_description=long_description, long_description_content_type="text/markdown",