Future AI
  • 📌Future-AI | Introduction
  • 🗣️Official social networks
  • 🥳Fairlaunch - Pinksale
  • Overview Future-AI
    • 🔹The beginning of AI
      • 🔹Success of IA
    • 🌐GPT-3
      • 🌐How does GPT-3 work?
      • 🌐What are the uses of GPT-3?
    • 🔹Telegram Bot
      • 🔹Twitter Bot
      • 🔹Discord Bot
      • 🔹More bots
    • 🌐Metaverse
      • 🌐Future-AI Metaverse
      • 🌐iNFT Protocol
    • 🔹Decentralized App
    • 🔹Brigde
      • ☑️Dapp Brigde
    • 🌐Future-AI Characters
    • 🔹Copy Trader
    • 🌐DAOGovernance
    • 🔹Wallet Future-AI
      • 🔹Download Trust Wallet
      • 🔹Future-AI integration with Trust Wallet
    • 🌐Staking
      • 🔹Parcels
    • 🔹Yield Farming
    • 🌐Future-AI Providers
      • AI Provider Integration
    • 🔹Future-AI Executors
      • 🔹AI Executor File Integrity
      • 🔹Data Source Provider
      • 🔹Thesis case provider
      • 🔹Script Developer
      • 🔹AI Executor
      • 🔹AI Executor with Docker
      • 🔹AI Executor Incentive Mechanism
  • token future-ai
    • 🌐Tokenomics
    • 🔹Token metrics
    • 🌐Roadmap
    • 🔹KYC & Audit
    • 🌐Team
Powered by GitBook
On this page
  1. Overview Future-AI
  2. Future-AI Executors

Thesis case provider

A brief description of how to develop a test case for an AI service on Future-AI:

As Future-AI currently supports only shell script, a provider cannot use popular programming languages such as Python, Java & Nodejs to develop their services.

When developing a test case, it must have at least three input arguments. The first one is used for the name of the data source that it needs to run, while the second and the third are the input and expected output respectively provided by the user. In some cases, the user's input may not be necessary, but we still need to reserve it for other cases. The expected output should be compared to the output of the data source, and if the output does not meet the requirement (of the test case) then we return null. This is very important, as currently, Future-AI only checks if the output of a test case is empty or equal to null. If it passes these conditions, the result from data source will be collected and considered valid. An example of a test case is:

#!/bin/bash

# $2 should be reserved for test case input if necessary

func_result="`/bin/bash .futureaifile/"$1"`"
# $3 is the expected output
expected_output=$(echo "$3" |base64 --decode)
diff=$(echo "scale=2; $func_result - $expected_output" |bc) # |bc allows adding two 
# allow compare integer with float
if awk 'BEGIN {exit !('$diff' < 10000)}';
then 
  echo $func_result
else
  echo null
fi
PreviousData Source ProviderNextScript Developer

Last updated 2 years ago

🔹
🔹
Page cover image