Skip to content

Commit

Permalink
Merge branch 'main' into fix/enable-handle-fs-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
hari-kuriakose authored Jul 15, 2024
2 parents e4e91e3 + c23194e commit 620c145
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
13 changes: 12 additions & 1 deletion backend/workflow_manager/endpoint/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,17 @@ def handle_final_result(
results.append({"file": file_name, "result": result})

def load_file(self, input_file_path: str) -> tuple[str, BytesIO]:
"""Load file contnt and file name based on the file path.
Args:
input_file_path (str): source file
Raises:
InvalidSource: _description_
Returns:
tuple[str, BytesIO]: file_name , file content
"""
connector: ConnectorInstance = self.endpoint.connector_instance
connector_settings: dict[str, Any] = connector.connector_metadata
source_fs: fsspec.AbstractFileSystem = self.get_fsspec(
Expand All @@ -400,7 +411,7 @@ def load_file(self, input_file_path: str) -> tuple[str, BytesIO]:
file_content = remote_file.read()
file_stream = BytesIO(file_content)

return remote_file.key, file_stream
return os.path.basename(input_file_path), file_stream

@classmethod
def add_input_file_to_api_storage(
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/agency/actions/Actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
// Enable Deploy as ETL Pipeline only when
// destination connection_type is DATABASE and Source & Destination are Configured
setCanAddETLPipeline(
(destination?.connection_type === "DATABASE" ||
destination.connection_type === "MANUALREVIEW") &&
source?.connector_instance &&
destination.connector_instance
source?.connector_instance &&
((destination?.connection_type === "DATABASE" &&
destination.connector_instance) ||
destination.connection_type === "MANUALREVIEW")
);
}, [source, destination]);
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function OutputForDocModal({
const axiosPrivate = useAxiosPrivate();
const navigate = useNavigate();
const { setAlertDetails } = useAlertStore();
const { handleException } = useExceptionHandler();
const handleException = useExceptionHandler();
const { tokenUsage } = useTokenUsageStore();
const [selectedProfile, setSelectedProfile] = useState(defaultLlmProfile);

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/custom-tools/tool-ide/ToolIde.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

.tool-ide-prompts {
padding: 12px 6px 1px 12px;
height: 100% !important;
height: 100%;
}

.tool-ide-pdf {
Expand Down

0 comments on commit 620c145

Please sign in to comment.