changed endpoint for new version of the api

This commit is contained in:
anovazzi1 2023-02-14 16:34:20 -03:00
commit 391a357d16

View file

@ -2,7 +2,7 @@ import axios from "axios";
export async function getPrompts() {
const promises = (await axios.get("http://localhost:5003/list/prompts")).data.map(async (value, index) => {
const prompt = await axios.get("http://localhost:5003/templates/prompt", {
const prompt = await axios.get("http://localhost:5003/signatures/prompt", {
params: { name: value },
});
return { name: value, type: "promptNode", ...prompt.data };
@ -12,7 +12,7 @@ export async function getPrompts() {
export async function getChains() {
const promises = (await axios.get("http://localhost:5003/list/chains")).data.map(async (value, index) => {
const chain = await axios.get("http://localhost:5003/templates/chain", {
const chain = await axios.get("http://localhost:5003/signatures/chain", {
params: { name: value },
});
return { name: value, type: "chainNode", ...chain.data };
@ -22,7 +22,7 @@ export async function getChains() {
export async function getAgents() {
const promises = (await axios.get("http://localhost:5003/list/agents")).data.map(async (value, index) => {
const chain = await axios.get("http://localhost:5003/templates/agent", {
const chain = await axios.get("http://localhost:5003/signatures/agent", {
params: { name: value },
});
return { name: value, type: "agentNode", ...chain.data };
@ -32,7 +32,7 @@ export async function getAgents() {
export async function getMemories() {
const promises = (await axios.get("http://localhost:5003/list/memories")).data.map(async (value, index) => {
const chain = await axios.get("http://localhost:5003/templates/memory", {
const chain = await axios.get("http://localhost:5003/signatures/memory", {
params: { name: value },
});
return { name: value, type: "memoryNode", ...chain.data };
@ -42,7 +42,7 @@ export async function getMemories() {
export async function getTools() {
const promises = (await axios.get("http://localhost:5003/list/tools")).data.map(async (value, index) => {
const prompt = await axios.get("http://localhost:5003/templates/tool", {
const prompt = await axios.get("http://localhost:5003/signatures/tool", {
params: { name: value },
});
return { name: value, type: "toolNode", ...prompt.data };
@ -52,7 +52,7 @@ export async function getTools() {
export async function getModels() {
const promises = (await axios.get("http://localhost:5003/list/llms")).data.map(async (value, index) => {
const prompt = await axios.get("http://localhost:5003/templates/llm", {
const prompt = await axios.get("http://localhost:5003/signatures/llm", {
params: { name: value },
});
return { name: value, type: "modelNode", ...prompt.data };