Create, Evaluate, and Connect AI Skills
Python ai-agentsai-skillsartificial-intelligenceknowledge-graphlarge-language-modelsnatural-language-processingopenkgskillnetskills
update evaluator and Readme.md
Jiang Chen921720e36c02
diff --git a/README.md b/README.mdindex 2911d5b..6cfbf1f 100644--- a/README.md+++ b/README.md@@ -213,13 +213,13 @@ for path in created_paths:Assess the Safety, Completeness, Executability, Modifiability and Cost-Aware of a skill. Supports both remote GitHub URLs and local directories.```python+# Evaluate from local directory# target_skill = "./my_skills/web_search"++# Evaluate from GitHub URL (uses github_token if provided during initialization)target_skill = "https://github.com/microsoft/autogen/tree/main/samples/tools/web_search"-# Evaluates the skill using the client's API keyresult = client.evaluate(target=target_skill)--# Display resultsprint(f"Evaluation Result: {result}")```diff --git a/skillnet-ai/README.md b/skillnet-ai/README.mdindex 7168404..e61c847 100644--- a/skillnet-ai/README.md+++ b/skillnet-ai/README.md@@ -154,13 +154,13 @@ created_paths = client.create(Assess the Safety, Completeness, Executability, Modifiability and Cost-Aware of a skill. Supports both remote GitHub URLs and local directories.```python+# Evaluate from local directory# target_skill = "./my_skills/web_search"++# Evaluate from GitHub URL (uses github_token if provided during initialization)target_skill = "https://github.com/microsoft/autogen/tree/main/samples/tools/web_search"-# Evaluates the skill using the client's API keyresult = client.evaluate(target=target_skill)--# Display resultsprint(f"Evaluation Result: {result}")```diff --git a/skillnet-ai/src/skillnet_ai/client.py b/skillnet-ai/src/skillnet_ai/client.pyindex 030298f..ea22fcf 100644--- a/skillnet-ai/src/skillnet_ai/client.py+++ b/skillnet-ai/src/skillnet_ai/client.py@@ -246,7 +246,8 @@ class SkillNetClient:base_url=self.base_url,model=model,max_workers=max_workers,- cache_dir=cache_dir+ cache_dir=cache_dir,+ github_token=self.github_token)evaluator = SkillEvaluator(config)diff --git a/skillnet-ai/src/skillnet_ai/evaluator.py b/skillnet-ai/src/skillnet_ai/evaluator.pyindex 897424a..5b87fd2 100644--- a/skillnet-ai/src/skillnet_ai/evaluator.py+++ b/skillnet-ai/src/skillnet_ai/evaluator.py@@ -37,6 +37,7 @@ class EvaluatorConfig:script_python: str = "python"include_script_results: bool = Falsemax_script_output_chars: int = 400+ github_token: Optional[str] = None@dataclass@@ -770,7 +771,7 @@ class SkillEvaluator:raise ValueError("API key is required")self.config = config- self.downloader = SkillDownloader()+ self.downloader = SkillDownloader(api_token=config.github_token)self.loader = SkillLoader()self.prompt_builder = PromptBuilder()self.llm_client = LLMClient(config)