Skip to content

Conversation

@suyccc
Copy link
Collaborator

@suyccc suyccc commented Oct 14, 2025

No description provided.

@gasvn gasvn requested a review from Copilot October 14, 2025 17:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces batch processing capabilities for text embeddings using Azure OpenAI. The new TextEmbeddingTool allows processing both single strings and lists of strings for efficient embedding generation.

  • Adds a new TextEmbeddingTool class that supports both single and batch text embedding processing
  • Creates configuration files and registry entries for the new tool
  • Updates the module initialization to include the new TextEmbeddingTool

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/tooluniverse/text_embedding_tool.py Implements the main TextEmbeddingTool class with batch processing support
src/tooluniverse/default_config.py Adds configuration path for text embedding tools
src/tooluniverse/data/text_embedding_tools.json Defines tool schema and configuration for text embedding
src/tooluniverse/init.py Updates module exports to include TextEmbeddingTool

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

api_key=os.getenv("AZURE_OPENAI_API_KEY"),
api_version="2024-10-21",
)
print("ToolConfig for TextEmbeddingTool:", tool_config)
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

Debug print statement should be removed from production code. Use proper logging instead.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +47
text = arguments.get("text")
if not text:
return {"error": "`text` parameter is required."}
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

Duplicate validation logic. The validate_input method already handles this check, but it's not being called before run().

Suggested change
text = arguments.get("text")
if not text:
return {"error": "`text` parameter is required."}
try:
self.validate_input(**arguments)
except ValueError as e:
return {"error": str(e)}
text = arguments.get("text")

Copilot uses AI. Check for mistakes.
@suyccc suyccc closed this Oct 14, 2025
@suyccc suyccc reopened this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant