query_configuration.mdx 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. title: '🔍 Query configurations'
  3. ---
  4. ## AppConfig
  5. | option | description | type | default |
  6. |-------------|-----------------------|---------------------------------|------------------------|
  7. | log_level | log level | string | WARNING |
  8. | embedding_fn| embedding function | chromadb.utils.embedding_functions | \{text-embedding-ada-002\} |
  9. | db | vector database (experimental) | BaseVectorDB | ChromaDB |
  10. ## AddConfig
  11. |option|description|type|default|
  12. |---|---|---|---|
  13. |chunker|chunker config|ChunkerConfig|Default values for chunker depends on the `data_type`. Please refer [ChunkerConfig](#chunker-config)|
  14. |loader|loader config|LoaderConfig|None|
  15. ### ChunkerConfig
  16. |option|description|type|default|
  17. |---|---|---|---|
  18. |chunk_size|Maximum size of chunks to return|int|Default value for various `data_type` mentioned below|
  19. |chunk_overlap|Overlap in characters between chunks|int|Default value for various `data_type` mentioned below|
  20. |length_function|Function that measures the length of given chunks|typing.Callable|Default value for various `data_type` mentioned below|
  21. Default values of chunker config parameters for different `data_type`:
  22. |data_type|chunk_size|chunk_overlap|length_function|
  23. |---|---|---|---|
  24. |docx|1000|0|len|
  25. |text|300|0|len|
  26. |qna_pair|300|0|len|
  27. |web_page|500|0|len|
  28. |pdf_file|1000|0|len|
  29. |youtube_video|2000|0|len|
  30. |docs_site|500|50|len|
  31. ### LoaderConfig
  32. _coming soon_
  33. ## QueryConfig
  34. |option|description|type|default|
  35. |---|---|---|---|
  36. |template|custom template for prompt|Template|Template("Use the following pieces of context to answer the query at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. \$context Query: \$query Helpful Answer:")|
  37. |history|include conversation history from your client or database|any (recommendation: list[str])|None
  38. |stream|control if response is streamed back to the user|bool|False|
  39. ## ChatConfig
  40. All options for query and...
  41. _coming soon_
  42. History is handled automatically, the config option is not supported.