Text Generation
English
opsiie
artificial-intelligence
self-centered-intelligence
sci
ai-assistant
multi-modal
image-generation
video-generation
music-generation
conversational-ai
blockchain
web3
facial-recognition
voice-synthesis
bioinformatics
financial-intelligence
text-classification
sentiment-analysis
token-classification
ner
question-answering
fill-mask
summarization
translation
text2text-generation
zero-shot-classification
image-classification
image-segmentation
object-detection
image-to-text
text-to-image
image-to-image
audio-classification
automatic-speech-recognition
text-to-speech
video-classification
depth-estimation
document-question-answering
visual-question-answering
zero-shot-image-classification
zero-shot-audio-classification
zero-shot-object-detection
feature-extraction
image-feature-extraction
mask-generation
table-question-answering
text-to-audio
File size: 22,734 Bytes
719d15c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 | import time
from colorama import Fore
import pygame
import os
# *** Help Command ***
def display_help():
"""Displays a minimal and slick help screen with grouped commands."""
pygame.mixer.init()
# Dynamically construct the path to system_sounds/helpbell.mp3
sound_path = os.path.join(os.path.dirname(__file__), 'system_sounds', 'helpbell.mp3')
pygame.mixer.music.load(sound_path)
pygame.mixer.music.play()
print(Fore.LIGHTGREEN_EX + """
ββββββ ββββββ βββββββ ββ ββ βββββββ
ββ ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββββββ βββββββ ββ ββ βββββ
ββ ββ ββ ββ ββ ββ ββ
ββββββ ββ βββββββ ββ ββ βββββββ
A Self-Centered Intelligence (SCI) Prototype
By ARPA HELLENIC LOGICAL SYSTEMS | Version: 0.3.79 XP | 01 JUL 2025
""")
time.sleep(1)
grouped_commands = {
'Mnemonic Matrix Commands': [
('/recall <keyword>', 'Pull relevant context from mnemonic matrix.'),
('/forget', 'Exclude the last prompt and response pair from being stored.'),
('/memorize <keyword>', 'Save an important message for future reference.')
],
'Agentic Matrix Commands': [
('/ask <model> <prompt>', 'Query a specific AI model with a follow-up prompt.'),
('/markets <keyword> [extra]', 'Retrieve market data for a sector, company, or currency with optional detailed intel. See /help markets.'),
('/read <file_path>', 'Read and analyze files using ARPA File Manager TAF-3000.'),
('/voice', 'Enable voice mode. /voiceoff disables it.'),
('/imagine <description>', 'Generate an image based on a text description. Use /imagine model for advanced settings.'),
('/video <description>', 'Generate a video based on a text description.'),
('/music <description>', 'Generate music based on a text description.'),
('/dna <sequence>', 'Advanced DNA/RNA/Protein sequence analysis.'),
('/room <agents>: <theme>', 'Create a temporal nexus with specified agents and theme.'),
('vision', 'Use image URLs in your prompts to analyze images.')
],
'Web3 Commands': [
('/0x buy <amount> <token> using <token> on <chain>', 'Buy tokens on specified chain'),
('/0x sell <amount> <token> for <token> on <chain>', 'Sell tokens on specified chain'),
('/0x send <chain> <token> <amount> to <recipient>', 'Send tokens to a known user'),
('/0x receive', 'Display wallet addresses'),
('/0x gas <low|medium|high>', 'Set gas price strategy'),
('/0x new token <name> <chain> <address>', 'Add new token configuration'),
('/0x new chain <name> <chain_id> <rpc_url>', 'Add new chain configuration'),
('/0x forget token <name>', 'Remove token configuration'),
('/0x forget chain <name>', 'Remove chain configuration')
],
'System Commands': [
('/mail <emails, subject, and message>', 'Send emails by parsing unstructured prompts. See /help mail.'),
('/weblimit <number>', 'Set webpage character extraction limit (500-5000).'),
('/status', 'Self-checks and system status update.'),
('/theme', 'Change terminal color theme between during conversation.'),
('/soulsig <message>', 'Manage your personalized Soul Signature. See /help soulsig for details.')
],
'BETA Commands': [
('/help <command>', 'Get elaborate help for specific commands. e.g., /help imagine')
]
}
for category, commands in grouped_commands.items():
print(Fore.LIGHTMAGENTA_EX + f'{category}:\n')
max_command_length = max(len(cmd[0]) for cmd in commands)
for command, description in commands:
print(Fore.LIGHTCYAN_EX + f'{command.ljust(max_command_length)} {Fore.LIGHTWHITE_EX}{description}\n')
print()
print(Fore.LIGHTRED_EX + 'Type "exit" or "quit" without / to terminate the session.\n')
detailed_help_texts = {
'recall': """
/recall <keyword>
Pull relevant context from past conversations and mnemonic matrix.
**Example:**
/recall project x
This will retrieve memories related to 'project x' from your previous interactions.
""",
'forget': """
/forget
Exclude the last prompt and response pair from being stored in the mnemonic matrix.
Use this command if you want to prevent the assistant from remembering the last interaction.
For example, if the agent is hallucinating, or the response accuracy temperature is low,
you can easily exclude the last pair of prompt and response hustle-free.
""",
'memorize': """
/memorize <keyword>
Save an important message for future reference.
**Example:**
/memorize Don't forget to submit the report by Friday.
This will store the message so you can recall it later using /recall.
""",
'ask': """
/ask <model> <prompt>
Query a specific AI model with a follow-up prompt.
**Available Models:**
- Nyx: ARPA Corporation's specialist agent
- Expertise: blockchain, AI, biotech, neurotech, quantum computing, DNA
- Specializes in Python prototyping and proof of concepts
- G1 Black: Google's advanced AI agent
- Standard mode: Technical analysis and problem-solving
- Live mode: Real-time data access and current information
Example: `/ask g1 live What's happening with Bitcoin right now?`
**Examples:**
/ask Nyx Write a Python function that reads URLs.
/ask G1 Analyze the current state of quantum computing.
/ask G1 live
**Note:**
- Each agent has their own personality and expertise areas
- Live modes provide access to real-time conversational mode with a specific agent.
""",
'markets': """
/markets <keyword> [extra]
Retrieve market data for a sector, company, currency, or cryptocurrency, with optional detailed information.
/markets compare <stock1> <stock2>
Compare two stocks across key financial metrics important to venture capitalists, competitors, and regulators.
**Examples:**
/markets energy
/markets tesla
/markets shell statistics
/markets compare tsla nio
/markets eur
/markets btc
**Usage:**
1. **Basic Market Data:**
`/markets <sector>`
Retrieve market data and news for a specific sector.
**Example:**
/markets energy
This will display the top stocks in the energy sector with performance data and news.
2. **Company Market Data:**
`/markets <company>`
Retrieve market data, performance, price chart, and news for a specific company.
**Example:**
/markets tesla
This will display market data for Tesla, including current price, performance metrics, a price chart, and top news articles.
3. **Currency Market Data:**
`/markets <currency>`
Retrieve current exchange rate, performance data, an ASCII chart, and additional volume and range statistics for a currency.
**Example:**
/markets usd
This will display market data for USD, including the current price, performance over different periods, and a simple chart.
4. **Cryptocurrency Market Data:**
`/markets <crypto>`
Retrieve the latest price, performance metrics, an ASCII chart, and additional data like market cap and circulating supply for a cryptocurrency.
**Example:**
/markets btc
This will display market data for Bitcoin, including current price, performance metrics, an ASCII chart, and volume details.
5. **Detailed Company Information:**
`/markets <company> <extra>`
Retrieve detailed information for a company based on the specified extra command.
**Extras:**
- **statistics**: Show key statistics for the company, such as valuation measures and financial highlights.
- **history**: Display historical price data for the company.
- **profile**: Show the company's profile, including industry, sector, employee count, and a business summary.
- **financials**: Display the company's financial statements.
- **analysis**: Provide analyst recommendations and estimates.
- **options**: List available options expiration dates and show the options chain.
- **holders**: Display major and institutional shareholders.
- **sustainability**: Show sustainability metrics and ESG scores.
**Examples:**
/markets shell statistics
/markets tesla financials
/markets nio analysis
6. **Compare Two Stocks:**
`/markets compare <stock1> <stock2>`
Compare two stocks across the top 10 most important verticals for venture capitalists, competitors, and governments/regulators. The comparison includes metrics such as market capitalization, revenue growth, profit margins, and financial ratios.
**Example:**
/markets compare tsla nio
This will display a side-by-side comparison of Tesla and NIO, highlighting key financial metrics to assess their performance and valuation.
**Note:**
- The `/markets` command provides real-time data pulled from Yahoo Finance.
- Ensure you have an active internet connection for the most up-to-date information.
""",
'dna': """
/dna <sequence> [options]
GDDA (Genetic Due Diligence Analysis) System v0.21 XP
**Sequence Analysis Types:**
- DNA: Automatic detection of DNA sequences
- RNA: RNA-specific analysis with structure prediction
- Protein: Protein sequence analysis and structure prediction
**Core Features:**
1. Basic Analysis:
- Sequence type detection
- Length and composition analysis
- GC content calculation
- K-mer frequency analysis
- Anomaly detection
2. Structure Analysis:
- DNA: Melting temperature, motif detection
- RNA: Secondary structure prediction, minimum free energy
- Protein: Secondary structure (Ξ±-helix, Ξ²-sheet, coil)
3. Advanced Analysis:
- Homology search with visual alignment
- Patent and literature search
- Database cross-references
- Regulatory element detection
- Protein family and domain prediction
4. RNA-Specific Features:
- miRNA targeting sites
- siRNA regions
- RNA structure visualization
- Regulatory elements detection
- Database references (Rfam, miRBase, GtRNAdb)
5. Protein-Specific Features:
- Molecular weight calculation
- Amino acid composition
- Cellular localization prediction
- Protein families and domains
- Hydrophobicity profile
- UniProt/Pfam/PROSITE references
**Output Format:**
- Cyberpunk-styled visual reports
- Sequence alignments with identity scores
- Structure visualizations
- Publication and patent references
- Interactive data visualization
**Options:**
--verbose Detailed analysis output
--type TYPE Force specific sequence type
--format FORMAT Input format (default/fasta)
--export FORMAT Export format (json/csv/txt)
--homology Include sequence similarity search
--structure Include structure prediction
--patents Include patent database search
--literature Include scientific literature search
**Examples:**
/dna ATGCGTAACGGCATTAGC
/dna --type rna AUGCGUAACGGCAUUAGC
/dna --verbose --homology MAKVLISPKQW
/dna --format fasta --export json sequence.fa
""",
'0x': """
/0x <subcommand> [arguments]
Web3 Transaction Interface Commands:
1. Buy Tokens:
/0x buy <amount> <token> using <token> on <chain>
Example: /0x buy 10 degen using eth on base
2. Sell Tokens:
/0x sell <amount> <token> for <token> on <chain>
Example: /0x sell 5 degen for eth on base
3. Send Tokens:
/0x send <chain> <token> <amount> to <recipient>
Example: /0x send base eth 0.1 to Ross
4. View Addresses:
/0x receive
Shows your and OPSIE's wallet addresses
5. Set Gas Strategy:
/0x gas <low|medium|high>
Example: /0x gas medium
6. Add New Token:
/0x new token <name> <chain> <address>
Example: /0x new token pepe base 0x123...def
7. Add New Chain:
/0x new chain <name> <chain_id> <rpc_url>
Example: /0x new chain avalanche 43114 https://api.avax.network/ext/bc/C/rpc
8. Remove Token:
/0x forget token <name>
Example: /0x forget token pepe
9. Remove Chain:
/0x forget chain <name>
Example: /0x forget chain avalanche
Notes:
- All transactions require confirmation
- Gas prices adjust based on network conditions
- Use known usernames for recipients
- Base chains (Base, Ethereum, Polygon) cannot be removed
- Token addresses must be valid checksummed addresses
""",
'receive': """
/receive
Display OPSIE's and the current user's public wallet addresses.
Use this command to get the addresses for receiving funds or top up your agent's wallet.
This is a beta function, use with caution.
""",
'imagine': """
/imagine <description>
Generate an image based on a text description.
**Example:**
/imagine a futuristic city skyline at sunset
/imagine model to pull current dream engine.
**Advanced Settings:**
/imagine model <model_name>
Use this to set a specific model for image generation.
Models are specified in a hugging-face fashion.
Default model is FLUX, and looks like "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
You don't have to use the full HF URL when using the command, instead use
/imagine model black-forest-labs/FLUX.1-dev
**Example models:**
# nsfw models
# hakurei/waifu-diffusion
# UnfilteredAI/NSFW-gen-v2
# black-forest-labs/FLUX.1-dev
""",
'music': """
/music <description>
Generate music based on a text description.
**Example:**
/music calm piano with soft strings
This will generate music matching your description.
After the generation process the audible specimen will be saved locally and then played back.
""",
'read': """
/read <file_path>
Read and analyze files (PDF, CSV, TXT, DOCX, XLSX) using ARPA File Manager TAF-3000.
**Example:**
/read "E:\\Documents\\report.pdf"
This will load the specified file for analysis.
Once you use /read and the file has been successfully loaded, you will enter a temporal data pocket.
During the file query context window, TAF-3000 will be assisting you with your requests.
You can type /close to exit the file query context window and return to default conversational mode.
/open will reload the file if it's still in the temporal memory.
""",
'open': """
/open
Reopen the last loaded file context for follow-up queries.
Use this command to continue interacting with the last file you loaded.
For more details on file-reading try /help read.
""",
'close': """
/close
Close the current file context.
This will end the file interaction mode and return to normal conversation.
For more details on file-reading try /help read.
""",
'weblimit': """
/weblimit <number>
Set webpage character extraction limit (500-5000).
**Example:**
/weblimit 2000
This sets the character limit to 2000 when extracting text from webpages.
This is particularly helpful when browsing large datasets or public domains to avoid overwhelming logical processes.
""",
'status': """
/status
Self-checks and system status update.
Use this command to perform system diagnostics and get a status report.
""",
'theme': """
/theme
Change color theme between Pastel and Vibrant during conversation.
**Usage:**
/theme
This command activates the theme selector, allowing you to switch between:
- **Pastel**: Soft, muted colors for a gentle visual experience
- **Vibrant**: High-contrast, bold colors for enhanced visibility
**Features:**
- Can be used at any time during a conversation
- Changes apply immediately to all future output
- Works in both text and voice modes
- Voice command: Simply say "theme" to activate
**Note:**
- The theme change affects all subsequent text output
- Previously printed text retains its original colors
- Logo and splash screen always use the selected theme
""",
'voice': """
/voice
Enable voice mode.
**Additional Options:**
/voiceoff - Disable voice mode.
/voice1 - OPSIE responds with voice; you type your input.
/voice2 - You speak your input; OPSIE responds in text.
""",
'vision': """
vision (beta)
Use image URLs in your prompts to analyze images.
**Example:**
Provide an image URL in your prompt, and OPSIE will analyze and describe the image.
Note: This feature is in beta and may not work with all images.
""",
'mail': """
/mail <emails and message>
Send emails by parsing unstructured prompts.
OPSIE can send emails from its native email account by interpreting your unstructured prompts to extract recipients, subject, and message content.
**Examples:**
1. **Send to a Single Email Address:**
```
/mail x@gmail.com with sub "XYZ" and content "Hey this is a test"
```
This sends an email with subject "XYZ" and body "Hey this is a test" to `x@gmail.com`.
2. **Send to Multiple Email Addresses:**
```
/mail x@gmail.com and y@gmail.com subject "123" content "Hi"
```
This sends an email with subject "123" and body "Hi" to both `x@gmail.com` and `y@gmail.com`.
3. **Send Using Contact Names:**
```
/mail send an email to Nick saying "Sup Nick!" with theme "Hello"
```
This sends an email with subject "Hello" and body "Sup Nick!" to the email address associated with "Nick" in the contacts list.
4. **View Unread Emails:**
```
/mail inbox
```
This command allows you to view and manage your unread emails, including reading and replying to them.
**How It Works:**
- OPSIE parses the prompt to extract email addresses or contact names, subject, and body.
- Email addresses are recognized by their format (e.g., name@example.com).
- Contact names are matched to emails using a known contacts dictionary.
- Keywords for subject include: subject, sub, theme, title, header.
- Keywords for body include: content, body, message, msg, context, main, saying.
- The order of elements in the prompt does not matter.
**Notes:**
- You can send emails to up to 5 recipients at once.
- If required information is missing or unclear, OPSIE will provide an error message with guidance.
- All email interactions are stored in the conversation history for reference.
**Privacy Considerations:**
- Be cautious when including sensitive information in emails.
- OPSIE anonymizes or sanitizes sensitive data when storing conversations.
""",
'help': """
/help <command>
Get elaborate help for specific commands.
**Example:**
/help imagine
This will display detailed information and examples for the 'imagine' command.
""",
'soulsig': """
/soulsig
Soul Signatures are personalized prompts that define your unique interaction with Opsie. Each user has their own Soul Signature, which reflects their preferences, personality traits, and past interactions with Opsie.
**Commands:**
1. **View Your Soul Signature:**
- `/soulsig`
- This command displays your current Soul Signature.
2. **Add to Your Soul Signature:**
- `/soulsig <message>`
- This command allows you to add a new line to your Soul Signature. For example:
```
/soulsig My favorite color is Lilac.
/soulsig Do not reply using my middle name.
/soulsig You are my physics lecturer.
```
3. **Wipe Your Soul Signature:**
- `/soulsig wipe`
- This command clears your Soul Signature, allowing you to start fresh.
- Once your SoulSig is wiped, it seizes to live in the mnemonic matrix. Permanent data loss is imminent. Proceed with caution!
4. **Heal Your Soul Signature:**
- `/soulsig heal`
- This command restores your Soul Signature from temporary storage if it was wiped. Use this if you change your mind after initiating a wipe.
**Note:** Your Soul Signature is a way for Opsie to remember your preferences and enhance your interactions. This data pocket has the highest informational hierarchy in System Prompt.
""",
'room': """
/room <agent1, agent2...>: <room theme>
Create a temporal virtual nexus where multiple AI agents collaborate and interact.
**Usage:**
/room nyx, g1: Brainstorm quantum computing applications
/room g1: Discuss current AI trends
**Features:**
- OPSIE is automatically included in all rooms
- Agents share their system prompts for context awareness
- Real-time collaborative discussion and brainstorming
- Agents can debate, evaluate, and build upon each other's ideas
- Room theme guides the conversation focus
**Commands in Room:**
- Address specific agents by starting message with their name
Example: "Nyx, what do you think about this approach?"
- `/close` - Exit the room (with option to save conversation)
**Room Storage:**
- When closing a room, you'll be asked to save the conversation
- If saved, conversations are stored as CSV files for future reference
**Note:**
- Multiple agents can participate in the same conversation
- Each agent maintains their unique personality and expertise
- Conversations are contextual and build upon previous messages
""",
'video': """
/video <description>
Generate a video based on a text description.
**Example:**
/video a sunset timelapse over a city skyline
This will generate a video matching your description.
After the generation process, the visual sequence will be saved locally and then played back.
Note: Video generation may take longer than other media types due to the complexity of processing.
The generated videos are saved in the OPSIIE Generated Videos directory.
"""
}
def display_detailed_help(command_name):
"""Displays detailed help for a specific command."""
help_text = detailed_help_texts.get(command_name)
if help_text:
print(Fore.LIGHTCYAN_EX + help_text)
else:
print(Fore.RED + f"No detailed help found for command: {command_name}")
|