TronAssistant | AI companion for developers on Tron

Hi @BraveBran
I understand your concerns, but we are definitely working hard to improve the project. Unlike any other project on AI track, we we have a more detailed plan to take this to markets.
With our chatbot we aim to help out developers in the ecosystem but at the same time we have plans to role out chat SDK for projects in the ecosystem, allowing them to build their own knowledge base and build a custom chatbot for their developer docs embedded in their website.
Apart from this we have feedback from some people to roll out the project dashboard as well to allow users to use the chatbot even without installing the extension. We are actively working on the dashboard and will be rolling ut out in this coming week itself.
We do want to ensure you that we have a lots of ideas in the pipeline to make this project more usable by the community as well as make it self sustainable going ahead.

Let me know if you have any more queries.

3 Likes

Hi @Hgogia

Thank you for sharing the link after making it public!

If you donā€™t hear from me to turn back to private, please do it after the 30th of October at the latest.

Thank You!

1 Like

Hello and thank you for sharing! Iā€™m glad to see this product as a browser extension where it can be in quick reach.

This project promises to offer quick answers for questions about TRON apps and documentation.

The main thing that is missing is that it is not streaming the responses to the client as they are generated by (Iā€™m assuming, OpenAI). This means that the responses appear to be ā€œslowerā€ as they are all presented at once. I know this is a pain. I implemented this too, my code is below.

Keep it up, and glad to see this contribution


  /**
   * Run the hydrated messages.
   * 
   * Using: https://platform.openai.com/docs/guides/chat
   * 
   * @return void
   */
  private function runHydratedMessages(): void
  {
    $fullResponse = '';
    $responseBuffer = '';
    $handlePartialOutput = $this->handlePartialOutput;
    $responseStreamingHandler = function ($curlHandle, $responseBody) use (&$responseBuffer, &$fullResponse, $handlePartialOutput) {
      $retval = strlen($responseBody);
      $responseBuffer .= $responseBody;
      if (strpos($responseBuffer, "\n\n") === false) {
        return $retval;
      }
      $responseParts = explode("\n\n", $responseBuffer);
      $responseBuffer = array_pop($responseParts);
      foreach ($responseParts as $event) {
        // Only process data event
        if (!str_starts_with($event, 'data: ')) {
          continue;
        }
        $responsePart = substr($event, strlen('data: '));
        if (strlen($responsePart) === 0) {
          continue;
        }
        if ($responsePart === '[DONE]') {
          continue;
        }
        $responseObject = json_decode($responsePart);
        if ($responseObject->choices[0]->finish_reason !== null) {
          continue;
        }
        // data: {"id":"chatcmpl-7pcDx6jP42vi9Yk40hTXmD8IYCgKR","object":"chat.completion.chunk","created":1692059361,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"delta":{"content":"202"},"finish_reason":null}]}
        // call $handlePartialOutput
        $handlePartialOutput($responseObject->choices[0]->delta->content);
        $fullResponse .= $responseObject->choices[0]->delta->content;
      }
      return $retval;
    };

    $curlHandle = curl_init();
    curl_setopt_array($curlHandle, [
      CURLOPT_URL => 'https://api.openai.com/v1/chat/completions',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_POST => true,
      CURLOPT_POSTFIELDS => json_encode([
        'model' => 'gpt-3.5-turbo',
        'messages' => $this->hydratedMessages,
        'stream' => true,
      ]),
      CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . self::API_KEY,
        'Content-Type: application/json',
      ],
      CURLOPT_WRITEFUNCTION => $responseStreamingHandler,
      // CURLOPT_HEADER => true, // get response headers
    ]);
    $response = curl_exec($curlHandle);
    $info = curl_getinfo($curlHandle);
    // $responseBody = substr($response, $info['header_size']);
    // $responseHeaders = substr($response, 0, $info['header_size']);
    // process result
    // $responseObject = json_decode($responseBody);
    // $this->debug->run = $responseObject;
    $this->debug->info = $info;
    $this->debug->fullResponse = $fullResponse;
    $this->cost = strlen($fullResponse) * self::PRICE_PER_THOUSAND_BYTES / 1000;
    $this->output = $fullResponse;
    // todo: where to handle errors?
    //   to test: insufficient funds
    //   to test: to many requests/taken too long
    //   to test: invalid key
    //   to test: unsavory input
  }
1 Like

Same question with TronGPT, Will the things I teach the bot be learned and applied to other users? Or will it just come from you instructing and adding to the database. We also want to contribute some tutorials as well as integrate our products for bots, so that developers can easily integrate into their systems, shortening development time.

Glad to hear, gonna check out your new updates and already excited :+1:

1 Like

Sure @EMerchant

We are also working on a web based dashboard and will be adding it to the github organisation itself, will make sure to keep its code public as well.

Hi @fulldecent

Thanks for your kind words.

Also regarding streaming response, we definitely had that in mind but just skipped it to ship other priority features. But now since you said this, I will make sure to add it in next few days itselfšŸ‘

Hi @tronsave.io

We would definitely love to collaborate with you guys regarding this. Currently we are not saving the users chat with us so there is no training on user chats.

But yes, we are regularly building our knowledge base and you can provide the documentations around your project in any formats possible. We would be happy to add them.
Thatā€™s what the end goal for our project is, to have collaboration with dapps across the ecosystem and be the ultimate resource for the community

2 Likes

Thanks you.
Here some docs from mysite: https://docs.tronsave.io/market/how-to-buy-energy and Connect TronSave - Tronsave
If can we want connect your telegram for next step.

:rocket: Exciting News from TronAssistant! :rocket:

Weā€™re thrilled to announce some game-changing updates for our project:

:globe_with_meridians: Web-Based Dashboard: Now you can access TronAssistant and ask your Tron-related questions right on our website, from any device! The chatbot provides not only answers but also valid document links to guide you. Please visit the dashboard at - https://tron-ai-beryl.vercel.app/

:dart: New Feature: Your feedback is invaluable, and itā€™s driving us to explore new horizons. We have started developing a feature to scan smart contracts for vulnerabilities, leveraging our trained AI comprehensively.

:bulb: Smart Contract Integration: Have smart contract code to discuss? TronAssistantā€™s got you covered. You can chat with the bot about your code and get insights. Just add your code using the button on right side of dashboard and start chatting

:soon: Upcoming Chat SDK: Weā€™re working tirelessly to launch the chat SDK for DApps soon, making it easier for DApp integration.

:handshake: We Need Your Support: TronAssistant is on a mission to empower Tron developers and the broader community. Weā€™re committed to building for as many use cases as possible. Your support and feedback mean the world to us.

Stay tuned for more updates and innovations as we continue to evolve and enhance TronAssistant. Together, weā€™re making the Tron ecosystem even more exciting and accessible! :rocket::man_technologist::star2:

@EMerchant @fulldecent @manfred_jr @UltimaTron @StevenTRON

1 Like

Iā€™m loving the UI/UX design of the website, itā€™s clear enough for even the visually impaired to see and itā€™s also commendable how it seems to carry same color gradient as Tronā€™s logo, kudos for the update!

I havenā€™t made it mobile-friendly just yet. Iā€™m currently working on a few critical items that are in the pipeline, and they take priority over making it mobile-friendly at this moment. Thank you for the feedback; itā€™s much appreciated!

3 Likes

I think I can tweak it a little my setting my browser mode to desktop just to have a full view of the website, thanks for constantly rolling out updates, cheers :clinking_glasses:

1 Like

Hi

If you like our project, please consider voting for us in the AI track #I7 TronAssistant | AI companion for developers on Tron

1 Like

This seems to be a really interesting project which makes it easier for developers to navigate the TRON blockchain, which can be a headache sometimes. You got the Bitcoin Ordinals (#A5) teams support!

Good luck!:raised_hands:

Welcome to hackaTRONs5 ! Good luck for hackathon and I wish TronAssistant helps current builders on Tron and guide future developers as well. I would like to know if this assistant helps in building on BTTC as well? If not, are there any plans for it? Thanks.

Hi @HODL

Thanks for taking out time to review our project.

Currently we have developed a chatbot which can refer to the existing official documentation of Tron chain and we are rapidly working to increase our knowledge base by importing more documentation around that along with shipping more features. So once we have enough knowledge base for Tron, we would definitely move up to add knowledge base for BTTC documentation. This is a tedious task and sometimes requires a lot of manual work as well so we are going about it slowly so that the accuracy is not affected in any way.

Let me know if there are any more queries

2 Likes

With the ongoing milestones, like loading Tronā€™s documentation and partnering with dapps, how do you envision TronAssistant evolving in the future to further support developers within the Tron community?

2 Likes

Hi @HunterTRON

So our first step is definitely to build a stable product by loading as much documentation as possible for our core chrome extension and dashboard. Side by side we are working on releasing the chat SDK soon for dapps which can add some source of revenue for us as well.

Going forward, if we envision TronAssistant for longer run, it will have a lot of features to help developers while their end to end journey of building Tron. Some things we have in mind includes a discord bot for Tron Developer discord channels, a smart contract security analysis bot, vs code extension for code completion specific to Solidity and many more.

Its more about getting the base AI ready first and then keep on building wrappers on it to address multiple scenarios.

2 Likes

Hi @admin.hackathon

I have a query regarding the milestones to be completed before 30th nov. We donā€™t have any smart contract deployment required for our project so how will the milestone be evaluated for us?

I have been trying to get the clarification since many days. Please let me know what exactly is the set expectations in this case.