mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 18:38:27 +00:00
Fix: mcp change the naming to add from ingest
This commit is contained in:
parent
dec82742fa
commit
b987a7cf3c
@ -1,4 +1,4 @@
|
||||
VERSION=0.1.3
|
||||
VERSION=0.1.6
|
||||
|
||||
# POSTGRES
|
||||
POSTGRES_USER=docker
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@redplanethq/core-mcp",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.3",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
@ -31,8 +31,8 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
||||
inputSchema: zodToJsonSchema(SearchKGSchema),
|
||||
},
|
||||
{
|
||||
name: "ingest_memory",
|
||||
description: "Ingest data into the memory graph pipeline",
|
||||
name: "add_memory",
|
||||
description: "Add data into the memory graph pipeline",
|
||||
inputSchema: zodToJsonSchema(IngestKGSchema),
|
||||
},
|
||||
],
|
||||
@ -51,7 +51,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
const result = await searchKnowledgeGraph(args);
|
||||
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
||||
}
|
||||
case "ingest_memory": {
|
||||
case "add_memory": {
|
||||
const args = IngestKGSchema.parse(request.params.arguments);
|
||||
const result = await ingestKnowledgeGraph(args);
|
||||
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
||||
|
||||
@ -12,10 +12,10 @@ export async function searchKnowledgeGraph(args: SearchKG) {
|
||||
|
||||
export async function ingestKnowledgeGraph(args: IngestKG) {
|
||||
const response = await axiosInstance.post(`/ingest`, {
|
||||
data: args.data,
|
||||
episodeBody: args.message,
|
||||
source: process.env.SOURCE,
|
||||
referenceTime: args.referenceTime,
|
||||
sessionId: args.sessionId ? args.sessionId : undefined,
|
||||
sessionId: undefined,
|
||||
});
|
||||
return response.data;
|
||||
}
|
||||
|
||||
@ -8,9 +8,8 @@ export const SearchKGSchema = z.object({
|
||||
});
|
||||
|
||||
export const IngestKGSchema = z.object({
|
||||
data: z.string().describe("The data to ingest in text format"),
|
||||
message: z.string().describe("The data to ingest in text format"),
|
||||
referenceTime: z.string().describe("The reference time in ISO format"),
|
||||
sessionId: z.string().optional().describe("The session id of the conversation"),
|
||||
});
|
||||
|
||||
export type SearchKG = z.infer<typeof SearchKGSchema>;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "core",
|
||||
"private": true,
|
||||
"version": "0.1.5",
|
||||
"version": "0.1.6",
|
||||
"workspaces": [
|
||||
"apps/*",
|
||||
"packages/*"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user