This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { embedMany } from 'ai'; | |
import { MarkdownTextSplitter } from 'langchain/text_splitter'; | |
import lmstudio from '../lmstudio.ts'; | |
import { DatabaseSync } from 'node:sqlite'; | |
import type { Embedding } from 'ai'; | |
import * as sqliteVec from 'sqlite-vec'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { groq } from '@ai-sdk/groq'; | |
import { type ListrTask } from 'listr2'; | |
import z from 'zod'; | |
import { type OutputExtractorFn, agent, instructions } from '../agent.ts'; | |
import { input, toOutput } from '../stream_utils.ts'; | |
import { execute } from '../swarm.ts'; | |
import { createProgress, withMessageProgress } from './planner.ts'; | |
const FinancialSearchItemSchema = z.object({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "d4793dea-29c4-4fc5-87e8-e154093c84a7", | |
"name": "OTO API V2", | |
"description": "## Introduction\n\n**OTO REST API** provides seamless integration for managing shipments, tracking deliveries, and handling logistics operations. With powerful endpoints for creating, updating, and querying shipments, it ensures efficient and reliable communication between your systems and OTO's platform.\n\n## Overview\n\nWe continuously analyze the e-commerce and logistics industries to enhance shipping and fulfillment processes, making them easier for vendors. OTO APIs are designed to automate and simplify key logistics operations, including:\n\n🚀 **Order Management** – Process, update, and sync orders seamlessly. \n🚀 **Shipment Management** – Create, manage, and track shipments effortlessly. \n🚀 **Return Management** – Handle return requests and reverse logistics smoothly. \n🚀 **Stock & Inventory Management** – Keep inventory levels updated in real-time. \n🚀 **Product Management** – O |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function generateKey() { | |
const sodium = await import('libsodium-wrappers').then( | |
({ default: sodium }) => sodium.ready.then(() => sodium) | |
); | |
return sodium.crypto_secretbox_keygen(); | |
} | |
export async function encrypt(key: ArrayBuffer, plain: string) { | |
const sodium = await import('libsodium-wrappers').then( | |
({ default: sodium }) => sodium.ready.then(() => sodium) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Column, Entity, PrimaryColumn } from 'typeorm'; | |
@Entity() | |
export class Locales { | |
@PrimaryColumn({ nullable: false }) | |
code!: string; | |
@Column({ unique: true, nullable: false }) | |
displayName!: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ajv from 'ajv'; | |
import addErrors from 'ajv-errors'; | |
import addFormats from 'ajv-formats'; | |
import validator from 'validator'; | |
import { ErrorObject, JSONSchemaType } from 'ajv'; | |
import { PartialSchema } from 'ajv/dist/types/json-schema'; | |
import { ProblemDetailsException } from 'rfc-7807-problem-details'; | |
const ajv = new Ajv({ | |
allErrors: true, | |
useDefaults: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createInterface } from 'readline'; | |
import { observeFile } from './observer.ts'; | |
import { PassThrough } from 'stream'; | |
const controller = new AbortController(); | |
const signal = controller.signal; | |
const duplex = new PassThrough(); | |
const reader = createInterface({ | |
input: duplex, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs, { rm } from 'fs'; | |
import { mkdir, writeFile } from 'fs/promises'; | |
import git from 'isomorphic-git'; | |
import http from 'isomorphic-git/http/node'; | |
import os from 'os'; | |
import { dirname, join } from 'path'; | |
import { Context, Inject, Injectable, ServiceLifetime } from 'tiny-injector'; | |
import { v4 } from 'uuid'; | |
import { safeFail } from '@faslh/utils'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Console } from 'node:console'; | |
import { createReadStream, createWriteStream } from 'node:fs'; | |
import { | |
type IncomingMessage, | |
type ServerResponse, | |
createServer, | |
} from 'node:http'; | |
import { Readable } from 'node:stream'; | |
import ollama from 'ollama'; | |
import { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"projectName": "Todo API", | |
"title": "Todo API", | |
"description": "A simple API for managing todos", | |
"extensions": ["core", "identity", "postgresql", "hono", "fly"], | |
"sourceCode": "", | |
"author": { | |
"name": "January", | |
"url": "https://github.com/JanuaryLabs" | |
} |
NewerOlder