MCPcopy Create free account
hub / github.com/Xyntopia/taskyon / convertTasksToOpenAIThread

Function convertTasksToOpenAIThread

src/modules/chat.ts:695–706  ·  view source on GitHub ↗
(
  taskList: LLMTask[],
  fileMappings: Record<string, string>
)

Source from the content-addressed store, hash-verified

693}
694
695function convertTasksToOpenAIThread(
696 taskList: LLMTask[],
697 fileMappings: Record<string, string>
698): OpenAI.Beta.ThreadCreateParams.Message[] {
699 return taskList.map((task) => ({
700 role: 'user',
701 content: task.content || '',
702 file_ids: (task.context?.uploadedFiles || [])
703 .map((file) => fileMappings[file])
704 .filter((id) => id !== undefined),
705 }));
706}
707
708export async function getOpenAIAssistantResponse(
709 task: LLMTask,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected