Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ai/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@llamaindex/openai": "npm:@llamaindex/openai@^0.4.16",
"@llamaindex/readers": "npm:@llamaindex/readers@^3.1.18",
"llamaindex": "npm:llamaindex@^0.11.26",
"@runt/lib": "jsr:@runt/lib@^0.13.0",
"@runtimed/agent-core": "jsr:@runtimed/agent-core@^0.2.0",
"npm:pyodide": "npm:pyodide@^0.27.7",
"@std/async": "jsr:@std/async@^1.0.0",
"@std/path": "jsr:@std/path@^1.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/ai/groq-client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RuntOpenAIClient } from "./openai-client.ts";
import type { OpenAIConfig } from "./openai-client.ts";
import type { AiModel } from "@runt/lib";
import { logger, VERSION } from "@runt/lib";
import type { AiModel } from "@runtimed/agent-core";
import { logger } from "@runtimed/agent-core";

export class GroqClient extends RuntOpenAIClient {
override provider: string = "groq";
Expand All @@ -11,7 +11,7 @@ export class GroqClient extends RuntOpenAIClient {

override getConfigMessage(): string {
const configMessage = `# Groq Configuration Required

Groq API key not found. Please set \`GROQ_API_KEY\` environment variable.`;
return configMessage;
}
Expand Down Expand Up @@ -71,7 +71,7 @@ export class AnacondaAIClient extends GroqClient {
override defaultConfig: OpenAIConfig = {
baseURL: "https://anaconda.com/api/assistant/v3/groq",
defaultHeaders: {
"X-Client-Version": VERSION,
"X-Client-Version": "0.2.0",
"X-Client-Source": "anaconda-runt-dev",
},
};
Expand All @@ -88,7 +88,7 @@ export class AnacondaAIClient extends GroqClient {

override getConfigMessage(): string {
const configMessage = `# Anaconda/Runt Configuration Required

RUNT API key not found. Please set \`RUNT_API_KEY\` environment variable.`;
return configMessage;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/mcp-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
CallToolResultSchema,
ListToolsResultSchema,
} from "@modelcontextprotocol/sdk/types.js";
import { logger } from "@runt/lib";
import { logger } from "@runtimed/agent-core";
import { join } from "@std/path";

interface MCPServerConfig {
Expand Down
8 changes: 6 additions & 2 deletions packages/ai/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import stripAnsi from "strip-ansi";
import type OpenAI from "@openai/openai";

import type { AiModel, ExecutionContext, ModelCapability } from "@runt/lib";
import type {
AiModel,
ExecutionContext,
ModelCapability,
} from "@runtimed/agent-core";

import { handleToolCallWithResult } from "./tool-registry.ts";
import type {
Expand All @@ -14,7 +18,7 @@ import {
AI_TOOL_CALL_MIME_TYPE,
AI_TOOL_RESULT_MIME_TYPE,
} from "jsr:@runtimed/schema";
import { logger } from "@runt/lib";
import { logger } from "@runtimed/agent-core";

import { OpenAIClient } from "./openai-client.ts";
import { RuntOllamaClient } from "./ollama-client.ts";
Expand Down
4 changes: 2 additions & 2 deletions packages/ai/ollama-client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Ollama } from "npm:ollama";
import type { Message, Tool } from "npm:ollama";
import type { AiModel, ModelCapability } from "@runt/lib";
import { type ExecutionContext, logger } from "@runt/lib";
import type { AiModel, ModelCapability } from "@runtimed/agent-core";
import { type ExecutionContext, logger } from "@runtimed/agent-core";
import type OpenAI from "@openai/openai";

import { AI_TOOL_CALL_MIME_TYPE, AI_TOOL_RESULT_MIME_TYPE } from "@runt/schema";
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/openai-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type ExecutionContext,
logger,
type ModelCapability,
} from "@runt/lib";
} from "@runtimed/agent-core";
import { AI_TOOL_CALL_MIME_TYPE, AI_TOOL_RESULT_MIME_TYPE } from "@runt/schema";

import { getAllTools } from "./tool-registry.ts";
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/test/ollama-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
assertRejects,
} from "https://deno.land/std@0.208.0/assert/mod.ts";
import { RuntOllamaClient } from "../ollama-client.ts";
import type { ExecutionContext } from "@runt/lib";
import type { ExecutionContext } from "@runtimed/agent-core";

// Test utilities
interface TestOutput {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/test/streaming-markdown.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals } from "https://deno.land/std@0.208.0/assert/mod.ts";
import { RuntOpenAIClient } from "../openai-client.ts";
import type { ExecutionContext } from "@runt/lib";
import type { ExecutionContext } from "@runtimed/agent-core";

// Test utilities
interface TestOutput {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/tool-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "@runt/schema";

import type { Store } from "jsr:@runtimed/schema";
import { logger } from "@runt/lib";
import { logger } from "@runtimed/agent-core";
import { getMCPClient } from "./mcp-client.ts";

export interface NotebookTool {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/vector-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type Document, Settings, VectorStoreIndex } from "llamaindex";
import { OpenAI, OpenAIEmbedding } from "@llamaindex/openai";
import { SimpleDirectoryReader } from "@llamaindex/readers/directory";
import { TextFileReader } from "@llamaindex/readers/text";
import { logger, LogLevel } from "@runt/lib";
import { logger, LogLevel } from "@runtimed/agent-core";
import { dirname, join } from "@std/path";

// Type definitions for llamaindex objects
Expand Down
1 change: 1 addition & 0 deletions packages/lib/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"imports": {
"@runt/schema": "jsr:@runt/schema@^0.13.0",
"@runtimed/agent-core": "jsr:@runtimed/agent-core@^0.2.0",
"@std/cli": "jsr:@std/cli@^1.0.0",
"@std/assert": "jsr:@std/assert@^1.0.0",
"@std/crypto": "jsr:@std/crypto@^1.0.0",
Expand Down
Loading