This project is a React application built with Vite that allows users to query an API endpoint and display the results. The application provides a user-friendly interface for inputting queries and viewing responses.
react-vite-client
├── src
│ ├── App.tsx # Main application component
│ ├── main.tsx # Entry point of the React application
│ ├── components
│ │ ├── QueryForm.tsx # Component for user input form
│ │ └── ResultDisplay.tsx # Component for displaying API results
│ ├── types
│ │ └── index.ts # TypeScript interfaces for API data
│ └── services
│ └── api.ts # API service for making requests
├── index.html # Main HTML file
├── package.json # npm configuration file
├── tsconfig.json # TypeScript configuration file
└── vite.config.ts # Vite configuration file
-
Clone the repository:
git clone <repository-url> cd react-vite-client
-
Install dependencies:
npm install
-
Run the application:
npm run dev
-
Open your browser: Navigate to
http://localhost:8000
to view the application.
- Use the input form to modify the "q" parameter and submit your query.
- The results from the API will be displayed below the form in a structured format.
The application makes a POST request to the /multi-async
endpoint with the following JSON structure:
{
"key": "pyconjp2025",
"q": "<your-query>",
"options": {
"models": [
"gemini-2.0-flash", "gemini-1.5-flash"
],
"roles": [
"あなたは日本の中学生です。。", "あなたは数学者です。"
],
"max_tokens": 1024
}
}
This project is licensed under the MIT License.