Code Monkey home page Code Monkey logo

aiproxy's Introduction

For use case

https://github.com/lukehollis/ai-murder-mystery-hackathon

  1. Install the deps:
pip3 install -r requirements.txt
  1. Run the server:
uvicorn main:app --reload
  1. Call /query_llm
curl -X POST "http://localhost:8000/query_llm" \
     -H "Content-Type: application/json" \
     -d '{"question": "What incidents we have? Reason step by step"}'
  1. Call /stream_request
curl -X POST "http://localhost:8000/stream_request" \
     -H "Content-Type: application/json" \
     -d '{
           "inputs": [{"role": "user", "content": "Who are you?"}],
           "max_tokens": 800,
           "stop": ["[INST", "[INST]", "[/INST]", "[/INST]"],
           "model": "llama3-8b"
         }'
  1. Call MoA:
curl -X POST "http://localhost:8000/moa_request" \
     -H "Content-Type: application/json" \
     -d '{"question": "What are some fun things to do in SF?"}'
  1. Call RAG stack /groq_query
curl -X POST "http://localhost:8000/groq_query" \
     -H "Content-Type: application/json" \
     -d '{
           "prompt_text": "What are some fun things to do in SF?"
         }'
  1. /llamaindex_query
curl -X POST "http://localhost:8000/llamaindex_query" \
     -H "Content-Type: application/json"
  1. Call All at once:
curl -X POST "http://localhost:8000/combined" \
     -H "Content-Type: application/json" \
     -d '{
           "inputs": [{"role": "user", "content": "Who are you?"}],
           "max_tokens": 800,
           "stop": ["[INST", "[INST]", "[/INST]", "[/INST]"],
           "model": "llama3-8b"
         }'

Friends Webhook:

curl -X POST "http://127.0.0.1:8000/api/multion_webhook" -H "Content-Type: application/json" -d '{
  "url": "https://news.ycombinator.com/",
  "command": "Find the top comment of the top post on Hackernews."
}'

Multion Webhook:

curl -X POST "http://127.0.0.1:8000/multion_webhook" -H "Content-Type: application/json" -d '{
  "url": "https://github.com",
  "command": "Show the contribution history screenshot of github user for last year. Provide details: how many repos contributed, what is primary language of use, how many github stars he get, what is his linkedin and twitter accounts, where he works and lives" 
}'
curl -X POST "http://127.0.0.1:8000/webhook" -H "Content-Type: application/json" -d '{  
  "id": 1,                    
  "createdAt": "2024-07-21T12:34:56",
  "transcript": "transcript",
  "structured": {
    "title": "title",
    "overview": "overview",
    "emoji": "emoji",
    "category": "category",
    "actionItems": ["Action item 1", "Action item 2"]
  },
  "pluginsResponse": ["This is a plugin response item"],
  "discarded": false
}'

aiproxy's People

Contributors

sakomws avatar

Stargazers

Mark Bain avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.