o-reasonable
Advanced tools
+1
-1
| { | ||
| "name": "o-reasonable", | ||
| "version": "0.0.5", | ||
| "version": "0.0.6", | ||
| "description": "O-Reasonable is a lightweight reasoning agent designed to mimic logical planning and problem-solving capabilities using cost-effective OpenAI models. It generates step-by-step plans, executes them sequentially, and synthesizes a final answer, making it a practical tool for structured reasoning tasks.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+46
-0
@@ -63,2 +63,3 @@ # O-Reasonable 🧠 | ||
| apiKey?: string; // Optional API key override | ||
| baseURL?: string; // Custom base URL for OpenAI-compatible APIs | ||
| enableLogs?: boolean; // Enable/disable console logs (default: false) | ||
@@ -68,2 +69,47 @@ } | ||
| ## Using OpenAI-Compatible APIs | ||
| O-Reasonable supports any OpenAI-compatible API by specifying a custom `baseURL`. Here are some examples: | ||
| ### Local Models (Ollama, LM Studio, etc.) | ||
| ```typescript | ||
| import { runAgent } from 'o-reasonable'; | ||
| // Using Ollama with a local model | ||
| const result = await runAgent("Explain quantum computing", { | ||
| baseURL: "http://localhost:11434/v1", | ||
| model: "llama2", // or any model available in Ollama | ||
| apiKey: "ollama" // Ollama requires any non-empty key | ||
| }); | ||
| // Using LM Studio | ||
| const result = await runAgent("What are the benefits of TypeScript?", { | ||
| baseURL: "http://localhost:1234/v1", | ||
| model: "local-model", | ||
| apiKey: "lm-studio" | ||
| }); | ||
| ``` | ||
| ### Azure OpenAI | ||
| ```typescript | ||
| const result = await runAgent("Analyze market trends", { | ||
| baseURL: "https://your-resource.openai.azure.com", | ||
| model: "gpt-35-turbo", // Azure deployment name | ||
| apiKey: process.env.AZURE_OPENAI_API_KEY | ||
| }); | ||
| ``` | ||
| ### Other OpenAI-Compatible Providers | ||
| ```typescript | ||
| // Example with any OpenAI-compatible service | ||
| const result = await runAgent("Create a project plan", { | ||
| baseURL: "https://api.your-provider.com/v1", | ||
| model: "your-model-name", | ||
| apiKey: "your-api-key" | ||
| }); | ||
| ``` | ||
| ## Return Type | ||
@@ -70,0 +116,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
411930
0.36%8077
0.09%152
43.4%