0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
77 lines
2.9 KiB
YAML
77 lines
2.9 KiB
YAML
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
|
|
description: Azure OpenAI Assistant with Multiple Tools
|
|
|
|
prompts:
|
|
- '{{prompt}}'
|
|
|
|
providers:
|
|
- id: azure:assistant:your_assistant_id
|
|
label: azure-assistant-multi-tool
|
|
config:
|
|
apiHost: your-resource-name.openai.azure.com
|
|
# Load tools from external file
|
|
tools: file://tools/multiple-tools.json
|
|
# Function callbacks for each tool
|
|
functionToolCallbacks:
|
|
get_weather: |
|
|
async function(args) {
|
|
try {
|
|
const parsedArgs = JSON.parse(args);
|
|
const location = parsedArgs.location;
|
|
const unit = parsedArgs.unit || 'c';
|
|
console.log(`Weather request for ${location} in ${unit}`);
|
|
|
|
// Simple weather response
|
|
return JSON.stringify({
|
|
location,
|
|
temperature: unit === 'c' ? 22 : 72,
|
|
unit,
|
|
condition: 'sunny',
|
|
forecast: 'Clear skies for the next few days.'
|
|
});
|
|
} catch (error) {
|
|
console.error('Error in get_weather function:', error);
|
|
return JSON.stringify({ error: String(error) });
|
|
}
|
|
}
|
|
suggest_recipe: |
|
|
async function(args) {
|
|
try {
|
|
const parsedArgs = JSON.parse(args);
|
|
const ingredients = parsedArgs.ingredients || [];
|
|
console.log(`Recipe requested with ingredients: ${ingredients.join(', ')}`);
|
|
|
|
// Simple recipe suggestion
|
|
return JSON.stringify({
|
|
recipe: {
|
|
name: "Simple Pasta",
|
|
ingredients: ["pasta", "olive oil", "garlic", "salt"],
|
|
instructions: "1. Boil pasta\n2. Heat oil and garlic\n3. Toss pasta in oil\n4. Season to taste"
|
|
}
|
|
});
|
|
} catch (error) {
|
|
console.error('Error in suggest_recipe function:', error);
|
|
return JSON.stringify({ error: String(error) });
|
|
}
|
|
}
|
|
# Vector store configuration for file search
|
|
tool_resources:
|
|
file_search:
|
|
vector_store_ids:
|
|
- 'your_vector_store_id'
|
|
# Standard parameters
|
|
temperature: 0.7
|
|
apiVersion: '2024-05-01-preview'
|
|
debug: true
|
|
|
|
tests:
|
|
# Multi-tool usage tests
|
|
- vars:
|
|
prompt: I'm planning to run some LLM evaluations tomorrow. Can you tell me about promptfoo's command line options and also check the weather in San Francisco?
|
|
- vars:
|
|
prompt: I need information about vector stores in promptfoo, the weather in Tokyo, and a simple pasta recipe for dinner.
|
|
- vars:
|
|
prompt: How do I set up a promptfoo evaluation? By the way, what's the weather like in Seattle today?
|
|
- vars:
|
|
prompt: I have pasta and garlic. Can you suggest a recipe and also help me understand how to use custom assertions in promptfoo?
|