mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 18:28:29 +00:00
Fix: add source to env
This commit is contained in:
parent
7bd19c2e18
commit
9f93824ba9
@ -68,6 +68,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function runServer() {
|
async function runServer() {
|
||||||
|
// Check required environment variables
|
||||||
|
const requiredEnvVars = ["API_TOKEN", "API_BASE_URL", "SOURCE"];
|
||||||
|
const missingEnvVars = requiredEnvVars.filter((envVar) => !process.env[envVar]);
|
||||||
|
|
||||||
|
if (missingEnvVars.length > 0) {
|
||||||
|
console.error(`Missing required environment variables: ${missingEnvVars.join(", ")}`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const transport = new StdioServerTransport();
|
const transport = new StdioServerTransport();
|
||||||
await server.connect(transport);
|
await server.connect(transport);
|
||||||
console.error("Sigma MCP Server running on stdio");
|
console.error("Sigma MCP Server running on stdio");
|
||||||
|
|||||||
@ -9,10 +9,11 @@ export async function searchKnowledgeGraph(args: SearchKG) {
|
|||||||
});
|
});
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function ingestKnowledgeGraph(args: IngestKG) {
|
export async function ingestKnowledgeGraph(args: IngestKG) {
|
||||||
const response = await axiosInstance.post(`/ingest`, {
|
const response = await axiosInstance.post(`/ingest`, {
|
||||||
data: args.data,
|
data: args.data,
|
||||||
source: args.source,
|
source: process.env.SOURCE,
|
||||||
referenceTime: args.referenceTime,
|
referenceTime: args.referenceTime,
|
||||||
sessionId: args.sessionId ? args.sessionId : undefined,
|
sessionId: args.sessionId ? args.sessionId : undefined,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -9,7 +9,6 @@ export const SearchKGSchema = z.object({
|
|||||||
|
|
||||||
export const IngestKGSchema = z.object({
|
export const IngestKGSchema = z.object({
|
||||||
data: z.string().describe("The data to ingest in text format"),
|
data: z.string().describe("The data to ingest in text format"),
|
||||||
source: z.string().describe("The source of the data"),
|
|
||||||
referenceTime: z.string().describe("The reference time in ISO format"),
|
referenceTime: z.string().describe("The reference time in ISO format"),
|
||||||
sessionId: z.string().optional().describe("The session id of the conversation"),
|
sessionId: z.string().optional().describe("The session id of the conversation"),
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user