Skip to content

Commit 2a60ca9

Browse files
committed
response
1 parent dd90ae4 commit 2a60ca9

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

src/datacustomcode/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,9 @@ def __new__(
151151
"Proxy config is required when reader is built from config"
152152
)
153153
proxy_init = config.proxy_config.to_object(spark)
154-
print(f"chuy1 reader, proxy_init: {proxy_init}")
155154

156155
reader_init = config.reader_config.to_object(spark) # type: ignore
157156
else:
158-
print("chuy2 reader")
159157
reader_init = reader
160158
if config.proxy_config is None:
161159
raise ValueError("Proxy config is required when reader is provided")
@@ -232,8 +230,8 @@ def write_to_dmo(
232230
self._validate_data_layer_history_does_not_contain(DataCloudObjectType.DLO)
233231
return self._writer.write_to_dmo(name, dataframe, write_mode, **kwargs)
234232

235-
def call_llm_gateway(self, LLM_MODEL_ID: str, prompt: str, maxTokens: int):
236-
self._proxy.call_llm_gateway(LLM_MODEL_ID, prompt, maxTokens)
233+
def call_llm_gateway(self, LLM_MODEL_ID: str, prompt: str, maxTokens: int) -> str:
234+
return self._proxy.call_llm_gateway(LLM_MODEL_ID, prompt, maxTokens)
237235

238236
def find_file_path(self, file_name: str) -> Path:
239237
"""Return a file path"""

src/datacustomcode/proxy/client/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ def __init__(self, spark=None, **kwargs):
2525
super().__init__(spark)
2626

2727
@abstractmethod
28-
def call_llm_gateway(self, llmModelId: str, prompt: str, maxTokens: int): ...
28+
def call_llm_gateway(self, llmModelId: str, prompt: str, maxTokens: int) -> str: ...

src/datacustomcode/proxy/client/local_proxy_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ class LocalProxyClientProvider(BaseProxyClient):
2222

2323
CONFIG_NAME = "LocalProxyClientProvider"
2424

25-
def call_llm_gateway(self, llmModelId: str, prompt: str, maxTokens: int):
26-
print("Hello, from LocalProxyClientProvider call_llm_gateway() World!")
25+
def call_llm_gateway(self, llmModelId: str, prompt: str, maxTokens: int) -> str:
26+
return f"Hello, thanks for using {llmModelId}. So many tokens: {maxTokens}"

src/datacustomcode/run.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ def run_entrypoint(
6262
)
6363

6464
package_type = get_package_type(entrypoint_dir)
65-
print(
66-
f"Chuy entrypoint: {entrypoint} directory: {entrypoint_dir} "
67-
f"package type: {package_type}"
68-
)
6965

7066
try:
7167
with open(config_json_path, "r") as f:

0 commit comments

Comments
 (0)