
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
vbi_evaluate_blogs
is a Python package designed to evaluate Vietnamese crypto blog content quality. It uses Azure OpenAI to analyze text quality, image relevance, and fact accuracy with a focus on Web3/DeFi content.
check_text_module.py
)check_image_module.py
)check_fact_module.py
)pip install vbi-evaluate-blogs
playwright install
AZURE_OPENAI_API_KEY="your_api_key"
AZURE_OPENAI_ENDPOINT="your_endpoint"
SEARXNG_URL="your_searx_instance" # For fact checking
from vbi_evaluate_blogs import check_text, check_image, check_fact
from langchain_openai import AzureChatOpenAI
from dotenv import load_dotenv
import os
load_dotenv()
# Initialize models
text_llm = AzureChatOpenAI(
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
model="o3-mini",
api_version="2024-12-01-preview"
)
image_llm = AzureChatOpenAI(
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
model="gpt-4o-mini", # Vision model required
api_version="2024-08-01-preview",
temperature=0.7,
max_tokens=16000
)
# Example content
content = """
# Sample Vietnamese Crypto Blog
Content with  and technical claims...
"""
# Get comprehensive analysis
text_report = check_text(text_llm, content)
image_report = check_image(text_llm, image_llm, content)
fact_report = check_fact(text_llm, content)
# Evaluate text content quality
result = check_text(text_llm, content)
print(result)
"""
Returns detailed report covering:
- Article structure analysis
- Content quality evaluation
- Grammar and style check
- SEO recommendations
"""
# Analyze images in content
result = check_image(text_llm, image_llm, content)
print(result)
"""
Returns comprehensive report including:
- Image relevance scores
- Alt text evaluation
- Visual accessibility analysis
- Image-text alignment check
"""
# Verify factual claims
result = check_fact(text_llm, content)
print(result)
"""
Returns fact check report with:
- Claim extraction
- Evidence analysis
- Source credibility
- Verification results
"""
You can customize the evaluation criteria by modifying the prompt templates in each module:
from vbi_evaluate_blogs.check_text_module import check_article_structure
# Custom structure analysis
result = check_article_structure(
llm=text_llm,
text=content,
custom_criteria="Your custom evaluation criteria..."
)
The modules default to Vietnamese but support other languages:
from vbi_evaluate_blogs.check_image_module import ImageAnalyzer
analyzer = ImageAnalyzer(
text_llm=text_llm,
image_llm=image_llm,
language="en" # Change output language
)
Evaluate content directly from files:
# Full analysis
python -m vbi_evaluate_blogs --file blog.md
# Specific checks
python -m vbi_evaluate_blogs --file blog.md --text --images
python -m vbi_evaluate_blogs --file blog.md --facts
MIT License. See LICENSE file for details.
FAQs
A short description of the package
We found that vbi-evaluate-blogs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.