agent-squad
agent-squad copied to clipboard
Bug: open AI agents and the docs are off sync
Expected Behaviour
systemPrompt property is part of OpenAIAgentOptions
Current Behaviour
systemPrompot is not part of OpenAIAgentOptions
Neither does it have agent.setSystemPrompt(...)
Code snippet
import { OpenAIAgent, OpenAIClassifier } from "multi-agent-orchestrator";
import { MultiAgentOrchestrator } from "multi-agent-orchestrator";
const agent = new OpenAIAgent({
name: 'OpenAI Assistant',
description: 'A versatile AI assistant powered by OpenAI models',
apiKey: 'your-openai-api-key',
model: 'gpt-4o',
streaming: true,
inferenceConfig: {
maxTokens: 500,
temperature: 0.7,
topP: 0.9,
stopSequences: ['Human:', 'AI:']
},
systemPrompt: 'You are a helpful AI assistant specialized in answering questions about technology.'
});
Possible Solution
Update your docs
Steps to Reproduce
- npm install multi-agent-orchestrator
- Add your own Open AI code
import { OpenAIAgent} from "multi-agent-orchestrator";
const agent = new OpenAIAgent({
name: 'OpenAI Assistant',
description: 'A versatile AI assistant powered by OpenAI models',
apiKey: 'your-openai-api-key',
model: 'gpt-4o',
streaming: true,
inferenceConfig: {
maxTokens: 500,
temperature: 0.7,
topP: 0.9,
stopSequences: ['Human:', 'AI:']
},
systemPrompt: 'You are a helpful AI assistant specialized in answering questions about technology.'
});
- Observe TS errors about systemPrompt. Examine your own TS and note it is indeed not there https://github.com/awslabs/multi-agent-orchestrator/blob/97b5e909a5037c6a03931fe58c8862a1c0a251ed/typescript/src/agents/openAIAgent.ts#L6