Skip to content

Commit 088d953

Browse files
authored
Merge pull request #45 from jdkent/fix/over-engineer
[FIX] simpler fix
2 parents 80e5146 + 9ee7971 commit 088d953

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

ns_extract/pipelines/api.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@ def __init__(
4343
self.env_variable = env_variable
4444
self.env_file = env_file
4545
self.client_url = client_url
46-
47-
# Split parameters between publang and OpenAI
48-
self.text_processing_kwargs = {
49-
"disable_abbreviation_expansion": disable_abbreviation_expansion
50-
}
51-
self.completion_kwargs = kwargs
46+
self.kwargs = kwargs
5247

5348
# Initialize OpenAI client
5449
self.client = self._load_client()
@@ -120,8 +115,8 @@ def _transform(self, inputs: dict, **kwargs) -> dict:
120115
],
121116
"output_schema": self._extraction_schema.model_json_schema(),
122117
}
123-
if self.completion_kwargs:
124-
completion_config.update(self.completion_kwargs)
118+
if self.kwargs:
119+
completion_config.update(self.kwargs)
125120

126121
# Replace $ with $$ to escape $ signs in the prompt
127122
# (otherwise interpreted as a special character by Template())

0 commit comments

Comments
 (0)