Spaces:
Paused
Paused
tamas.kiss commited on
Commit ·
8845dcb
1
Parent(s): 5a1d695
Update logs
Browse files267 unmodified lines26826927027127227327427527627714 unmodified lines29229329429529629729810 unmodified lines30931031131231331431531631731824 unmodified lines343344345346347348349267 unmodified linesmatch response_num:case 0:prompt = f"[INST] {prompt}\n Lets think step by step. [/INST] {start_template}"print(prompt)case 1:if retriever == "semantic_search":question = promptprint((f"You are a helpful kubernetes professional. [INST] Use the following documentation, if it is relevant to answer the question below. [/INST]\nDocumentation: [RETRIEVED_RESULTS_FROM_BOOK] [INST] Answer the following question: {question} [/INST]\nAnswer: \n")14 unmodified linesretrieved_results = google_search(prompt)question = promptprompt = f"You are a helpful kubernetes professional. [INST] Use the following documentation, if it is relevant to answer the question below. [/INST]\nDocumentation: {retrieved_results} </s>\n<s> [INST] Answer the following question: {prompt} [/INST]\nAnswer: "print((f"You are a helpful kubernetes professional. [INST] Use the following documentation, if it is relevant to answer the question below. [/INST]\nDocumentation: [RETRIEVED_RESULTS_FROM_GOOGLE] [INST] Answer the following question: {question} [/INST]\nAnswer: \n"10 unmodified lines)else:prompt = f"[INST] Answer the following question: {prompt} [/INST]\nAnswer: "print(prompt)case _:prompt = f"[INST] {prompt} [/INST]"print(prompt)return prompt, md24 unmodified linesreturn (prompt, answer[start:end].strip())modes = ["Kubectl command", "Kubernetes related definition", "Other"]print(f'{" Query Start ":-^40}')print("Classified as: " + modes[response_num])267 unmodified lines26826927027127227327427527627727827914 unmodified lines29429529629729829930030110 unmodified lines31231331431531631731831932032132232324 unmodified lines348349350351352353354267 unmodified linesmatch response_num:case 0:prompt = f"[INST] {prompt}\n Lets think step by step. [/INST] {start_template}"print('Kubectl command prompt:')print(prompt)case 1:if retriever == "semantic_search":question = promptprint('Semantic search prompt:')print((f"You are a helpful kubernetes professional. [INST] Use the following documentation, if it is relevant to answer the question below. [/INST]\nDocumentation: [RETRIEVED_RESULTS_FROM_BOOK] [INST] Answer the following question: {question} [/INST]\nAnswer: \n")14 unmodified linesretrieved_results = google_search(prompt)question = promptprompt = f"You are a helpful kubernetes professional. [INST] Use the following documentation, if it is relevant to answer the question below. [/INST]\nDocumentation: {retrieved_results} </s>\n<s> [INST] Answer the following question: {prompt} [/INST]\nAnswer: "print('Google search prompt:')print((f"You are a helpful kubernetes professional. [INST] Use the following documentation, if it is relevant to answer the question below. [/INST]\nDocumentation: [RETRIEVED_RESULTS_FROM_GOOGLE] [INST] Answer the following question: {question} [/INST]\nAnswer: \n"10 unmodified lines)else:prompt = f"[INST] Answer the following question: {prompt} [/INST]\nAnswer: "print('No retriever question prompt:')print(prompt)case _:prompt = f"[INST] {prompt} [/INST]"print('Other question prompt:')print(prompt)return prompt, md24 unmodified linesreturn (prompt, answer[start:end].strip())modes = ["Kubectl command", "Kubernetes related", "Other"]print(f'{" Query Start ":-^40}')print("Classified as: " + modes[response_num])
app.py+7-2