Skip to content

Commit

Permalink
fix gpt prediction function
Browse files Browse the repository at this point in the history
  • Loading branch information
iryna-kondr committed Aug 24, 2023
1 parent ed3a763 commit 73d6e13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies = [
"google-cloud-aiplatform>=1.27.0"
]
name = "scikit-llm"
version = "0.4.0"
version = "0.4.1"
authors = [
{ name="Oleg Kostromin", email="[email protected]" },
{ name="Iryna Kondrashchenko", email="[email protected]" },
Expand Down
4 changes: 4 additions & 0 deletions skllm/models/gpt/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ def _get_prompt(self, x: str) -> str:
def _build_label(self, label: str):
return label

def _predict_single(self, x):
completion = self._get_chat_completion(x)
return completion["choices"][0]["message"]["content"]

def fit(
self,
X: Union[np.ndarray, pd.Series, List[str]],
Expand Down

0 comments on commit 73d6e13

Please sign in to comment.