Vitrous commited on
Commit
fdefd89
·
verified ·
1 Parent(s): ce3f5fc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -10
README.md CHANGED
@@ -38,17 +38,30 @@ Eren Bot is an AI chatbot built using FastAPI and Hugging Face's transformers li
38
  ## Usage
39
  1. Run the FastAPI server:
40
  ```bash
41
- uvicorn main:app --reload
42
  ```
43
- This will start the FastAPI server with automatic reloading enabled for development.
44
 
45
- 2. Open your web browser and go to [http://127.0.0.1:8000/](http://127.0.0.1:8000/) to access the API documentation provided by FastAPI.
46
-
47
- 3. Use the provided endpoints to interact with the chatbot:
48
- - `/start_chat/`: Start a new chat thread by providing a prompt and a contextual prompt.
 
 
 
 
 
 
 
 
49
  - `/start_conversation/`: Start a new conversation thread by providing a prompt.
 
 
 
 
50
  - `/get_response/{thread_id}`: Retrieve the response from an existing conversation thread using its thread ID.
51
- - `/chat/`: Initiate a chat session by providing a prompt.
 
 
52
 
53
  ## Example
54
 
@@ -56,7 +69,7 @@ Eren Bot is an AI chatbot built using FastAPI and Hugging Face's transformers li
56
  import requests
57
 
58
  # Start a new chat session
59
- response = requests.post("http://127.0.0.1:8000/chat/", json={"prompt": "Hello, how are you?"})
60
  print(response.json())
61
  ```
62
 
@@ -65,6 +78,4 @@ print(response.json())
65
  This README provides an overview of the project, installation instructions, usage guidelines, and an example of how to interact with the chatbot using the provided endpoints. Feel free to customize it further to suit your project's needs.
66
  ```
67
 
68
- You can save this content to a file named `README.md` in your project directory.
69
 
70
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
38
  ## Usage
39
  1. Run the FastAPI server:
40
  ```bash
41
+ - The application runs from a Dockerfile where everything is setup for you
42
  ```
 
43
 
44
+ 2. Open your web browser and go to https://articko-artickbot.hf.space/api/v1/ to access the API documentation provided by FastAPI.
45
+ - Use the provided endpoints to interact with the chatbot:
46
+
47
+ 3.
48
+ - `/start_chat/`: Start a new chat thread by providing a prompt and a persona description prompt i.e
49
+ ```json
50
+ {"prompt":"what food would you recommend",
51
+ "persona_prompt":"you are a very helpful ai assistant. you are going to be polite and answer a humanily."
52
+ }
53
+ ```
54
+ - This method returns {'thread_id': thread_id, 'response': response}
55
+
56
  - `/start_conversation/`: Start a new conversation thread by providing a prompt.
57
+ ```json
58
+ {"prompt":"what is the time"}
59
+ - After the request is done, this function returns {'response': response}
60
+ ```
61
  - `/get_response/{thread_id}`: Retrieve the response from an existing conversation thread using its thread ID.
62
+
63
+ - Returns the specific thread id of the conversation
64
+
65
 
66
  ## Example
67
 
 
69
  import requests
70
 
71
  # Start a new chat session
72
+ response = requests.post("https://articko-artickbot.hf.space/api/v1/start_conversation", json={"prompt": "Hello, how are you?"})
73
  print(response.json())
74
  ```
75
 
 
78
  This README provides an overview of the project, installation instructions, usage guidelines, and an example of how to interact with the chatbot using the provided endpoints. Feel free to customize it further to suit your project's needs.
79
  ```
80
 
 
81