Created
February 1, 2025 17:00
-
-
Save KyMidd/d4897cc3a77c17265b19c9ba2affcaed to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| if os.environ.get("VERA_DEBUG", "False") == "True": | |
| print(f"🚀 Knowledge base response: {knowledge_base_response}") | |
| # Iterate through responses | |
| for result in knowledge_base_response["retrievalResults"]: | |
| citation_result = result['content']['text'] | |
| citation_url = result['location']['confluenceLocation']['url'] | |
| # Append to conversation | |
| conversation.append( | |
| { | |
| "role": "user", | |
| "content": [ | |
| { | |
| "type": "text", | |
| "text": f"Knowledge base citation to supplement your answer: {citation_result} from URL {citation_url}", | |
| } | |
| ], | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment