chat comple
Browse files- metadata_transformer.py +6 -6
metadata_transformer.py
CHANGED
@@ -15,13 +15,13 @@ You are a metadata schema translator. You translate metadata from one schema to
|
|
15 |
|
16 |
def translate(schema_input, schema_target):
|
17 |
prompt = '"""{} \n Translate the schema metadata file above to the schema: {}"""'.format(schema_input, schema_target)
|
18 |
-
response = huggingface.
|
19 |
model="meta-llama/Llama-2-7b-hf",
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
prompt=prompt,
|
25 |
temperature=0.9,
|
26 |
top_p=0.6,
|
27 |
max_tokens=256,
|
|
|
15 |
|
16 |
def translate(schema_input, schema_target):
|
17 |
prompt = '"""{} \n Translate the schema metadata file above to the schema: {}"""'.format(schema_input, schema_target)
|
18 |
+
response = huggingface.ChatCompletion.create(
|
19 |
model="meta-llama/Llama-2-7b-hf",
|
20 |
+
messages=[
|
21 |
+
{"role": "system", "content": system_message},
|
22 |
+
{"role": "user", "content": prompt},
|
23 |
+
],
|
24 |
+
# prompt=prompt,
|
25 |
temperature=0.9,
|
26 |
top_p=0.6,
|
27 |
max_tokens=256,
|