Skip to content

Commit

Permalink
fix: Correct external service casing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith committed Dec 29, 2024
1 parent 25e83ff commit d372cee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions control-plane/src/modules/integrations/tavily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { packer } from "../packer";
import { deleteServiceDefinition, upsertServiceDefinition } from "../service-definitions";
import { integrationSchema } from "./schema";
import { InstallableIntegration } from "./types";
import { tavilyIntegration } from "./constants";

const TavilySearchParamsSchema = z.object({
query: z.string(),
Expand Down Expand Up @@ -67,7 +68,7 @@ export async function searchTavily({
}

const definition = {
name: "Tavily",
name: tavilyIntegration,
functions: [
{
name: "search",
Expand Down Expand Up @@ -119,7 +120,7 @@ const syncTavilyService = async ({ clusterId, apiKey }: { clusterId: string; api

await upsertServiceDefinition({
type: "permanent",
service: "Tavily",
service: tavilyIntegration,
definition,
owner: { clusterId },
});
Expand Down
5 changes: 3 additions & 2 deletions control-plane/src/modules/integrations/toolhouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { logger } from "../observability/logger";
import { packer } from "../packer";
import { upsertServiceDefinition } from "../service-definitions";
import { InstallableIntegration } from "./types";
import { toolhouseIntegration } from "./constants";

const ToolHouseResultSchema = z.array(
z.object({
Expand Down Expand Up @@ -159,9 +160,9 @@ const syncToolHouseService = async ({
const tools = (await toolhouse.getTools()) as Anthropic.Messages.Tool[];

await upsertServiceDefinition({
service: "ToolHouse",
service: toolhouseIntegration,
definition: {
name: "ToolHouse",
name: toolhouseIntegration,
functions: tools.map(tool => {
return {
name: toInferableName(tool.name),
Expand Down
5 changes: 3 additions & 2 deletions control-plane/src/modules/integrations/valtown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { packer } from "../packer";
import { deleteServiceDefinition, upsertServiceDefinition } from "../service-definitions";
import { integrationSchema } from "./schema";
import { InstallableIntegration } from "./types";
import { valtownIntegration } from "./constants";

// Schema for the /meta endpoint response
const valtownMetaSchema = z.object({
Expand Down Expand Up @@ -93,9 +94,9 @@ const syncValTownService = async ({

await upsertServiceDefinition({
type: "permanent",
service: "valtown",
service: valtownIntegration,
definition: {
name: "valtown",
name: valtownIntegration,
description: meta.description,
functions: meta.functions.map(fn => ({
name: fn.name,
Expand Down

0 comments on commit d372cee

Please sign in to comment.