Spaces:
Runtime error
Runtime error
Commit
·
9dbf674
1
Parent(s):
62865d5
Update utils.py
Browse files
utils.py
CHANGED
@@ -29,7 +29,6 @@ import re
|
|
29 |
#os.environ["TOGETHER_API_KEY"] = "6101599d6e33e3bda336b8d007ca22e35a64c72cfd52c2d8197f663389fc50c5"
|
30 |
os.environ["OPENAI_API_KEY"] = "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"
|
31 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
32 |
-
os.environ["LANGCHAIN_ENDPOINT"]= "https://api.smith.langchain.com"
|
33 |
|
34 |
client = Client()
|
35 |
|
@@ -199,7 +198,7 @@ def get_gpt_response(transcription_path, query):
|
|
199 |
| StrOutputParser()
|
200 |
)
|
201 |
llm_output = rag_chain.invoke(query)
|
202 |
-
dataset =
|
203 |
|
204 |
client.create_example(
|
205 |
inputs={"input": query},
|
@@ -215,7 +214,7 @@ def get_gpt_response(transcription_path, query):
|
|
215 |
dataset_name="Sample LLM dataset",
|
216 |
llm_or_chain_factory=rag_chain,
|
217 |
evaluation=evaluation_config,
|
218 |
-
client=
|
219 |
)
|
220 |
print("Eval output!!!!")
|
221 |
print(eval_output)
|
|
|
29 |
#os.environ["TOGETHER_API_KEY"] = "6101599d6e33e3bda336b8d007ca22e35a64c72cfd52c2d8197f663389fc50c5"
|
30 |
os.environ["OPENAI_API_KEY"] = "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"
|
31 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
|
|
32 |
|
33 |
client = Client()
|
34 |
|
|
|
198 |
| StrOutputParser()
|
199 |
)
|
200 |
llm_output = rag_chain.invoke(query)
|
201 |
+
dataset = llm.create_dataset(dataset_name="Sample LLM dataset", description="A dataset with LLM inputs and outputs", data_type="llm")
|
202 |
|
203 |
client.create_example(
|
204 |
inputs={"input": query},
|
|
|
214 |
dataset_name="Sample LLM dataset",
|
215 |
llm_or_chain_factory=rag_chain,
|
216 |
evaluation=evaluation_config,
|
217 |
+
client=llm,
|
218 |
)
|
219 |
print("Eval output!!!!")
|
220 |
print(eval_output)
|