Skip to content

Commit 50498aa

Browse files
authored
Fixed CONTRIBUTING.md path, NOTICE path and query rewriting just if param is True (#126)
Signed-off-by: Gianluca Capuzzi <gianluca.posta78@gmail.com>
1 parent 8a5033e commit 50498aa

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ The **Hyperledger Labs AIFAQ Prototype (Agents Branch)** is an open-source conve
2424

2525
👉 Official Wiki Pages:
2626

27-
* [Hyperledger Labs Wiki](https://lf-hyperledger.atlassian.net/wiki/spaces/labs/pages/20290949/AI+FAQ+2025)
27+
- [Hyperledger Labs Wiki](https://lf-hyperledger.atlassian.net/wiki/spaces/labs/pages/20290949/AI+FAQ+2025)
2828

2929
👉 Weekly Community Calls:
3030

31-
* Every Monday (public) — join via [Hyperledger Labs Calendar](https://wiki.hyperledger.org/display/HYP/Calendar+of+Public+Meetings).
31+
- Every Monday (public) — join via [Hyperledger Labs Calendar](https://wiki.hyperledger.org/display/HYP/Calendar+of+Public+Meetings).
3232

3333
---
3434

3535
## 🧩 Features
3636

37-
* Conversational AI for targeted question answering
38-
* Supports RAG (Retrieval Augmented Generation) for enhanced accuracy
39-
* Easy integration via API and UI samples
40-
* Extensible architecture for multi-agent support
37+
- Conversational AI for targeted question answering
38+
- Supports RAG (Retrieval Augmented Generation) for enhanced accuracy
39+
- Easy integration via API and UI samples
40+
- Extensible architecture for multi-agent support
4141

4242
---
4343

@@ -76,6 +76,7 @@ MISTRALAI_API_KEY=<required - get from https://auth.mistral.ai/ui/login>
7676
OPENAI_API_KEY=<optional>
7777
HF_TOKEN=<required - get from https://huggingface.co/settings/tokens>
7878
```
79+
7980
<img src="./images/mistral.png" alt="Mistral API Key" width="500" height="300"/>
8081
<img src="./images/access_token.png" alt="HF Access Token" width="500" height="300"/>
8182

@@ -87,26 +88,26 @@ HF_TOKEN=<required - get from https://huggingface.co/settings/tokens>
8788
```bash
8889
streamlit run app.py
8990
```
91+
9092
<img src="./images/add_knowledge.png" alt="HF Access Token" width="500" height="300"/>
9193
<img src="./images/update_knowledge.png" alt="HF Access Token" width="500" height="300"/>
9294

93-
9495
🎉 Access the demo at: [http://3.225.169.87:8502/](http://3.225.169.87:8502/)
9596
<img src="./images/AIFAQ.png" alt="HF Access Token" width="500" height="300"/>
9697

9798
---
9899

99100
## 🌐 Open Source License
100101

101-
* **License:** Apache 2.0 (see [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE))
102-
* **3rd Party Libraries:** [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html)
103-
* **License Assembly:** [Assembling LICENSE and NOTICE](https://infra.apache.org/licensing-howto.html#mod-notice)
102+
- **License:** Apache 2.0 (see [`LICENSE`](./LICENSE) and [`NOTICE`](./docs/NOTICE))
103+
- **3rd Party Libraries:** [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html)
104+
- **License Assembly:** [Assembling LICENSE and NOTICE](https://infra.apache.org/licensing-howto.html#mod-notice)
104105

105106
---
106107

107108
## 🤝 Contributing
108109

109-
We welcome contributions! Please check our [CONTRIBUTING](./CONTRIBUTING.md) guidelines and [Antitrust Policy and Code of Conduct](https://lf-hyperledger.atlassian.net/wiki/spaces/HIRC/pages/19169404/Anti-trust+Policy+Notice+Code+of+Conduct).
110+
We welcome contributions! Please check our [CONTRIBUTING](./docs/CONTRIBUTING.md) guidelines and [Antitrust Policy and Code of Conduct](https://lf-hyperledger.atlassian.net/wiki/spaces/HIRC/pages/19169404/Anti-trust+Policy+Notice+Code+of+Conduct).
110111

111112
---
112113

@@ -118,12 +119,12 @@ Join our weekly public calls every Monday! See the [Hyperledger Labs Calendar](h
118119

119120
## 📢 Stay Connected
120121

121-
* [Slack Discussions](https://join.slack.com/t/aifaqworkspace/shared_invite/zt-337k74jsl-tvH_4ct3zLj99dvZaf9nZw)
122-
* [Hyperledger Labs Community](https://lf-hyperledger.atlassian.net/wiki/spaces/labs/pages/20290949/AI+FAQ+2025)
123-
* Official Website: [aifaq.pro](https://aifaq.pro)
122+
- [Slack Discussions](https://join.slack.com/t/aifaqworkspace/shared_invite/zt-337k74jsl-tvH_4ct3zLj99dvZaf9nZw)
123+
- [Hyperledger Labs Community](https://lf-hyperledger.atlassian.net/wiki/spaces/labs/pages/20290949/AI+FAQ+2025)
124+
- Official Website: [aifaq.pro](https://aifaq.pro)
124125

125126
---
126127

127128
## ⭐️ Star Graph
128129

129-
![Star Graph](https://starchart.cc/hyperledger-labs/aifaq.svg)
130+
![Star Graph](https://starchart.cc/hyperledger-labs/aifaq.svg)

src/mvt/pages/chatbot.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,10 @@ def save_feedback(username, msg_idx, feedback_type, response_snippet, reason=Non
148148
with st.chat_message("user"):
149149
st.write(prompt)
150150

151-
# Rewrite the query for better search
152-
rewritten_query = query_rewriting_llm(prompt)
153-
154151
with st.chat_message("assistant", avatar=logo_path):
155152
with st.spinner("Thinking..."):
156153
# Use rewritten query or original prompt based on config
157-
query = rewritten_query if config_data.get("use_query_rewriting", True) else prompt
154+
query = query_rewriting_llm(prompt) if config_data.get("use_query_rewriting", True) else prompt
158155
response = rag_chain.invoke({"input": query})
159156

160157
# Save response to database instead of text file

0 commit comments

Comments
 (0)