|
2 | 2 | // This is done to facilitate inspecting their TS types in VSCode. |
3 | 3 | // This file is not used when running this app. |
4 | 4 |
|
5 | | -// Files |
6 | | -import * as fs$ from "fs"; |
7 | | -import * as path$ from "path"; |
8 | | - |
9 | | -// HTTP |
10 | | -import http from "http"; |
11 | | -import { createHttpTerminator } from "http-terminator"; |
12 | | - |
13 | | -// Express |
14 | | -import express from "express"; |
15 | | -import cors from "express"; |
16 | | -import session from "express-session"; |
17 | | - |
18 | 5 | // AI - Ollama |
19 | | -import { Ollama, ChatRequest, ChatResponse, Message as OllamaMessage } from 'ollama'; |
| 6 | +import * as ollama from "ollama"; |
| 7 | +let olOllama: ollama.Ollama; |
| 8 | +let olChatRequest: ollama.ChatRequest; |
| 9 | +let olChatResponse: ollama.ChatResponse; |
| 10 | +let olMessage: ollama.Message; |
20 | 11 |
|
21 | 12 | // AI - OpenAI |
22 | | -import OpenAI from "openai"; |
23 | | -import { ChatCompletion } from "openai/resources/chat/completions.js"; |
24 | | -type ChatCompletionChoice = ChatCompletion.Choice; |
25 | | -import { ChatCompletionMessage } from "openai/resources/chat/completions.js"; |
26 | | -import { CompletionUsage } from "openai/resources/completions.js"; |
27 | | -let completionTokensDetails: CompletionUsage.CompletionTokensDetails; |
28 | | -let promptTokensDetails: CompletionUsage.PromptTokensDetails; |
| 13 | +import Openai from "openai"; |
| 14 | +let oaiChatCompletion: Openai.ChatCompletion; |
| 15 | +let oaiChatCompletionChoice: Openai.ChatCompletion.Choice; |
| 16 | +let oaiChatCompletionMessage: Openai.ChatCompletionMessage; |
| 17 | +let oaiChatCompletionUsage: Openai.CompletionUsage; |
| 18 | +let oaiCompletionTokensDetails: Openai.CompletionUsage.CompletionTokensDetails; |
| 19 | +let oaiPromptTokensDetails: Openai.CompletionUsage.PromptTokensDetails; |
29 | 20 |
|
30 | 21 | // AI - Google AI |
31 | | -import { GoogleGenerativeAI, ModelParams, GenerativeModel, |
32 | | - GenerateContentResult, GenerateContentResponse } from "@google/generative-ai"; |
| 22 | +import * as googleai from "@google/generative-ai"; |
| 23 | +let gaiGoogleAi: googleai.GoogleGenerativeAI; |
| 24 | +let gaiModelParams: googleai.ModelParams; |
| 25 | +let gaiGenerativeModel: googleai.GenerativeModel; |
| 26 | +let gaiGenerateContentResult: googleai.GenerateContentResult; |
| 27 | +let gaiGenerateContentResponse: googleai.GenerateContentResponse; |
33 | 28 |
|
34 | 29 | // AI - Anthropic |
35 | | -import { Anthropic, ClientOptions } from '@anthropic-ai/sdk'; |
| 30 | +import * as anthropic from "@anthropic-ai/sdk"; |
| 31 | +let antAnthropic: anthropic.Anthropic; |
| 32 | +let antClientOptions: anthropic.ClientOptions; |
36 | 33 | import { MessageCreateParams } from '@anthropic-ai/sdk/resources/index.mjs'; |
37 | | -import { Message, TextBlock } from '@anthropic-ai/sdk/resources/index.mjs'; |
38 | | - |
| 34 | +import { Message } from '@anthropic-ai/sdk/resources/index.mjs'; |
| 35 | +import { TextBlock } from '@anthropic-ai/sdk/resources/index.mjs'; |
0 commit comments