I have been struggling with this all day.
function calling has been working great. In one particular situation, I am setting a flag and calling a specific function back. When I force call that specific function , I am seeing that the assistant content is null.
I decided then to have that function call openAI chat completions for a response which is working fine but my final content is null.
my high level code is
const runner = client.beta.chat.completions
.runTools({
model: “gpt-3.5-turbo-0613”,
tool_choice:
if flag then set tool_choice to “functionC”
})
.on(“message”, (message) => console.log(message));
finalContent = await runner.finalContent();
function A
function B
function C {
{ set flag to true}
call openAI chatCompletions
return response
}
- Why is content null for assistant when function is forced. is it because, it doesnt use function calling?
- IN that case, why is finalContent null instead of content from second openAI call from function C
logs:
Function call event triggered for: customSolutionBuilder
~ file: aiProcessingFunction.js:314 ~ customSolutionBuilder ~ interactionCount: 2
~ file: advancedSolutionGenerator.js:9 ~ advancedSolutionGenerator ~ userQuery: vibration sensors
~ file: aiProcessingFunction.js:314 ~ customSolutionBuilder ~ interactionCount: 2
~ file: advancedSolutionGenerator.js:9 ~ advancedSolutionGenerator ~ userQuery: vibration sensors
~ file: advancedSolutionGenerator.js:35 ~ advancedSolutionGenerator ~ generatedQuestion: How do you plan on integrating and managing a large number of vibration sensors within your industrial IoT solution, considering factors such as device compatibility, connectivity requirements, data ingestion methods, and analytics capabilities?
~ file: aiProcessingFunction.js:321 ~ customSolutionBuilder ~ questionResponse: {
message: 'How do you plan on integrating and managing a large number of vibration sensors within your industrial IoT solution, considering factors such as device compatibility, connectivity requirements, data ingestion methods, and analytics capabilities? ',
flag: ‘advanced_solutions’
}
~ file: aiProcessingFunction.js:234 ~ eventHandler ~ customSolutionBuilderResponse: {
message: 'How do you plan on integrating and managing a large number of vibration sensors within your industrial IoT solution, considering factors such as device compatibility, connectivity requirements, data ingestion methods, and analytics capabilities? ',
flag: ‘advanced_solutions’
}
Response identified from advancedSolutionGenerator {
message: 'How do you plan on integrating and managing a large number of vibration sensors within your industrial IoT solution, considering factors such as device compatibility, connectivity requirements, data ingestion methods, and analytics capabilities? ',
flag: ‘advanced_solutions’
}
Flag status: advanced_solutions
~ file: advancedSolutionGenerator.js:35 ~ advancedSolutionGenerator ~ generatedQuestion: What specific challenges or objectives does the user intend to address with vibration sensors in their industrial IoT solution, and what is their strategy for data utilization towards maintenance and management?
~ file: aiProcessingFunction.js:321 ~ customSolutionBuilder ~ questionResponse: {
message: 'What specific challenges or objectives does the user intend to address with vibration sensors in their industrial IoT solution, and what is their strategy for data utilization towards maintenance and management? ',
flag: ‘advanced_solutions’
}
{
role: ‘tool’,
tool_call_id: ‘call_randomID1234’,
content: ‘{“message”:"What specific challenges or objectives does the user intend to address with vibration sensors in their industrial IoT solution, and what is their strategy for data utilization towards maintenance and management? ",“flag”:“advanced_solutions”}’
}
{
role: ‘tool’,
tool_call_id: ‘call_randomID1234’,
content: ‘{“message”:"What specific challenges or objectives does the user intend to address with vibration sensors in their industrial IoT solution, and what is their strategy for data utilization towards maintenance and management? ",“flag”:“advanced_solutions”}’
}
~ file: aiProcessingFunction.js:269 ~ eventHandler ~ finalContent: {“message”:"What specific challenges or objectives does the user intend to address with vibration sensors in their industrial IoT solution, and what is their strategy for data utilization towards maintenance and management? ",“flag”:“advanced_solutions”}
Flag status at end: advanced_solutions
~ file: aiProcessingFunction.js:292 ~ finalContent: null