dinhquangson commited on
Commit
cb48f96
1 Parent(s): cf7f044

Update QueryMetadataExtractor.py

Browse files
Files changed (1) hide show
  1. QueryMetadataExtractor.py +7 -1
QueryMetadataExtractor.py CHANGED
@@ -33,9 +33,15 @@ class QueryMetadataExtractor:
33
  Metadata fields: "{{metadata_fields}}"
34
  Extracted metadata fields:
35
  """
 
 
 
 
 
 
36
  self.pipeline = Pipeline()
37
  self.pipeline.add_component(name="builder", instance=PromptBuilder(prompt))
38
- self.pipeline.add_component(name="llm", instance=OpenAIGenerator(model="gpt-3.5-turbo"))
39
  self.pipeline.connect("builder", "llm")
40
 
41
  @component.output_types(filters=Dict[str, str])
 
33
  Metadata fields: "{{metadata_fields}}"
34
  Extracted metadata fields:
35
  """
36
+ generator = OpenAIGenerator(
37
+ api_key=Secret.from_env_var("OCTOAI_TOKEN"),
38
+ api_base_url="https://text.octoai.run/v1",
39
+ model="mixtral-8x22b-finetuned",
40
+ generation_kwargs = {"max_tokens": 512}
41
+ )
42
  self.pipeline = Pipeline()
43
  self.pipeline.add_component(name="builder", instance=PromptBuilder(prompt))
44
+ self.pipeline.add_component(name="llm", instance=generator)
45
  self.pipeline.connect("builder", "llm")
46
 
47
  @component.output_types(filters=Dict[str, str])