Skip to content

Commit 0928d8b

Browse files
author
BATT Emmanuel-EXT
committed
fix(pipeline): in some cases gpt-5 return quotes arround python response
1 parent 614723d commit 0928d8b

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "OpenHosta"
7-
version = "4.0.2"
7+
version = "4.0.3
88
description = "A lightweight library integrating LLM natively into Python"
99
keywords = ["AI", "GPT", "Natural language", "Autommatic", "Easy"]
1010
authors = [

src/OpenHosta/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "4.0.2"
1+
__version__ = "4.0.3"
22

33
from .defaults import config
44
from .defaults import reload_dotenv

src/OpenHosta/pipelines/simple_pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,13 @@ def pull_extract_data_section(self, inspection:Inspection, raw_response:str) ->
358358
chunk = response_lines[(section_pos[-2]+1):section_pos[-1]]
359359
# Remove chunk language and parameters
360360
response_string = "\n".join(chunk)
361+
362+
response_string = response_string.strip("\"'")
361363

362364
inspection.logs["clean_answer"] += response_string
363365
inspection.logs["response_string"] = response_string
364366

365-
return response_string.strip()
367+
return response_string
366368

367369
def pull_type_data_section(self, inspection:Inspection, response:Any) -> Any:
368370
"""Python Level"""

0 commit comments

Comments
 (0)