mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-12 02:08:28 +00:00
* feat: Episode ingestion update Benchmarking CORE * Feat: Spaces in knowledge graph * fix: remove daily assignment * Feat: add spaces * Feat: spaces --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
28 lines
702 B
TypeScript
28 lines
702 B
TypeScript
import { getEpisodeStatements } from "~/services/graphModels/episode";
|
|
|
|
export async function getEpisodeFacts(episodeUuid: string, userId: string) {
|
|
try {
|
|
const facts = await getEpisodeStatements({
|
|
episodeUuid,
|
|
userId,
|
|
});
|
|
|
|
return {
|
|
success: true,
|
|
facts: facts.map(fact => ({
|
|
uuid: fact.uuid,
|
|
fact: fact.fact,
|
|
createdAt: fact.createdAt.toISOString(),
|
|
validAt: fact.validAt.toISOString(),
|
|
attributes: fact.attributes,
|
|
})),
|
|
};
|
|
} catch (error) {
|
|
console.error("Error fetching episode facts:", error);
|
|
return {
|
|
success: false,
|
|
error: "Failed to fetch episode facts",
|
|
facts: [],
|
|
};
|
|
}
|
|
} |