Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
MarinaPlius
commited on
Commit
•
950c993
1
Parent(s):
f6186de
Update rag.py
Browse files
rag.py
CHANGED
@@ -104,10 +104,11 @@ class RAG:
|
|
104 |
def predict_completion(self, instruction, context, model_parameters):
|
105 |
|
106 |
client = OpenAI(
|
107 |
-
base_url=MODEL,
|
108 |
api_key=os.getenv("HF_TOKEN")
|
109 |
)
|
110 |
|
|
|
111 |
|
112 |
chat_completion = client.chat.completions.create(
|
113 |
model="tgi",
|
|
|
104 |
def predict_completion(self, instruction, context, model_parameters):
|
105 |
|
106 |
client = OpenAI(
|
107 |
+
base_url=os.getenv("MODEL"),
|
108 |
api_key=os.getenv("HF_TOKEN")
|
109 |
)
|
110 |
|
111 |
+
query = f"Context:\n{context}\n\nQuestion:\n{instruction}"
|
112 |
|
113 |
chat_completion = client.chat.completions.create(
|
114 |
model="tgi",
|