Skip to content

Instantly share code, notes, and snippets.

@dfinke
Created November 17, 2024 23:42
Show Gist options
  • Save dfinke/3b8e7d0cb05431a0779d2907ea4536ab to your computer and use it in GitHub Desktop.
Save dfinke/3b8e7d0cb05431a0779d2907ea4536ab to your computer and use it in GitHub Desktop.
$config = @{
Preferences = @{
defaultAgent = "StockAgent"
}
WebSearchAgent = @{
Name = "WebSearch"
LLM = New-OpenAIChat 'gpt-4o-mini'
Instructions = "Today is $(Get-Date)"
Tools = @(
New-TavilyAITool
)
ShowToolCalls = $true
}
StockAgent = @{
Name = "StockAgent"
LLM = New-OpenAIChat 'gpt-4o-mini'
Instructions = "Today is $(Get-Date). Use the stock ticker tool to get stock info."
Tools = @(
New-StockTickerTool
)
ShowToolCalls = $true
}
FileSystemAgent = @{
LLM = New-OpenAIChat 'gpt-4o-mini'
Instructions = "Today is $(Get-Date)"
Tools = @(
Register-Tool ls, gc, Set-Content
)
ShowToolCalls = $true
}
}
$defaultAgent = $config.Preferences.defaultAgent
$agent = $config.$defaultAgent
New-Agent @agent | Get-AgentResponse 'what did microsoft, apple, and google close at?'
@dfinke
Copy link
Author

dfinke commented Nov 17, 2024

Tinkering. The config hashtable could be a ps1 file.

Might be cool to be able to do StockAgent+WebAgent. More code would be needed.

We'll see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment