Skip to content

Commit

Permalink
use dataclasses
Browse files Browse the repository at this point in the history
Signed-off-by: Prithvi Kannan <[email protected]>
  • Loading branch information
prithvikannan committed Dec 18, 2024
1 parent 9ede063 commit f2cd0d7
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/databricks_ai_bridge/genie.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import time
from dataclasses import dataclass
from datetime import datetime
from typing import Optional, Union

Expand All @@ -18,16 +19,11 @@ def _count_tokens(text):
return len(encoding.encode(text))


@dataclass
class GenieResponse:
def __init__(
self,
result: Union[str, pd.DataFrame],
query: Optional[str] = "",
description: Optional[str] = "",
):
self.result = result
self.query = query
self.description = description
result: Union[str, pd.DataFrame]
query: Optional[str] = ""
description: Optional[str] = ""


@mlflow.trace(type="PARSER")
Expand Down

0 comments on commit f2cd0d7

Please sign in to comment.