Skip to content

SDK experience enhancement for function#93

Closed
ritaagarwala-sf wants to merge 22 commits intomainfrom
run_with_json
Closed

SDK experience enhancement for function#93
ritaagarwala-sf wants to merge 22 commits intomainfrom
run_with_json

Conversation

@ritaagarwala-sf
Copy link
Copy Markdown
Collaborator

datacustomcode init --code-type function ( SearchIndexChunking is default use-in-feature )
Creates a function with below signature:

def function(request: SearchIndexChunkingV1Request, runtime: Runtime) -> SearchIndexChunkingV1Response:

And generates a test.json reading the signature of function. Sample test.json will look like below:

{
"input": [
{
"text": "sample_text",
"metadata": {}
}
],
"max_characters": 100,
"additional_params": {}
}

Customer can test function with below command:
datacustomcode run ./payload/entrypoint.py --test-with payload/tests/test.json

print(f" ✂️ Chunk {chunk_id}: {len(chunk_text)} chars")
chunk_id += 1

print(f"✅ Generated {len(chunks)} chunks total")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want emoji's like this?

@ritaagarwala-sf ritaagarwala-sf changed the title @W-21929529 SDK experience enhancement for function SDK experience enhancement for function May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants