Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPT Bot Example #401

Open
robmoffat opened this issue Jun 20, 2023 · 2 comments
Open

GPT Bot Example #401

robmoffat opened this issue Jun 20, 2023 · 2 comments
Assignees
Labels

Comments

@robmoffat
Copy link
Member

There are a couple of things that would be great to build here:

  1. A bot that consumed the history of the room and was then able to answer questions about it.

  2. A bot that you could train by telling it what to do, and then it would perform those instructions in the room.

Is there any appetite for building these? (1) would be super useful in some of our organisations, it's something I looked at building in the past.

@robmoffat
Copy link
Member Author


Spring Bot LLM

@robmoffat robmoffat added the good first issue Good for newcomers label Jan 29, 2025
@robmoffat
Copy link
Member Author

robmoffat commented Mar 12, 2025

Controller

  1. Method:
@ChatRequest
public void respondInRoom(@Address chatRoom, Message m, Room r) { 
  // take the contents of the message and send in to the LLM for processing.  
  // look up instructions for chatRoom.
  // template the request
}

Instructions (JSON File deployed with the bot)

class Instructions {

  public List<String> roomsUsedIn;

  public Integer messagesPerDayLimit;

  public boolean onlyAdmin;
  
  public String template;

}

Example

  1. Admin configures the bot with the LLM API and Key that they want to use.

e.g. Llama running locally or ChatGPT running in the Cloud etc.

  1. Admin sets the instructions in a file when the bot is deployed.
Instructions {
  roomsUsedin: [ 'Room X'],
  messagesPerDayLimit: 100, 
  onlyAdmin: false,
  template: "Please look up the following ticker on Bloomberg and provide me the details of this stock ${userMessage} "
}
  1. In Room X User Types in:
@LLMBot Apple
  1. The Controller Assembles the template
Please look up the following ticker on Bloomberg and provide me the details of this stock Apple
  1. Controller sends request to the LLM API.

...

  1. LLM API Returns:
Apple Inc. (ticker: AAPL) is a leading technology company known for its innovative consumer electronics, software, and online services. As of March 12, 2025, at 10:32:25 UTC, Apple's stock is trading at $220.84, reflecting a decrease of $6.70 (-2.95%) from the previous close.​

In 2025, Apple's stock has experienced a decline of 11% year-to-date, marking its worst start since 2008. The company's performance is increasingly influenced by its operations in China, a significant market and manufacturing hub for Apple. Efforts to improve sales in the region are ongoing. ​
[Bloomberg](https://www.bloomberg.com/news/articles/2025-01-24/apple-aapl-shares-test-key-technical-level-amid-worst-start-since-2008)
[Bloomberg](https://www.bloomberg.com/news/articles/2025-02-13/apple-s-stock-market-performance-is-increasingly-made-in-china)

For the latest information and detailed stock analysis, you can visit Bloomberg's profile on Apple Inc.
  1. We convert from Markdown into MessageML/AdaptiveCard (using SpringBot).

  2. Return to user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants