This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def do_stuff(text): | |
words = text.split(' ') | |
# Convert all words to lowercase | |
words = [word.lower() for word in words] | |
# Trim spaces (though split already handles this well) | |
words = [word.strip() for word in words] | |
# Reverse the word order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from | |
# https://github.com/lm-sys/FastChat/blob/168ccc29d3f7edc50823016105c024fe2282732a/fastchat/serve/openai_api_server.py | |
import argparse | |
import asyncio | |
import json | |
import os | |
import time | |
from http import HTTPStatus | |
from typing import AsyncGenerator, Dict, List, Optional, Tuple, Union |