open_api_language_model_arguments.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. from dataclasses import dataclass, field
  2. @dataclass
  3. class OpenApiLanguageModelHandlerArguments:
  4. open_api_model_name: str = field(
  5. # default="HuggingFaceTB/SmolLM-360M-Instruct",
  6. default="deepseek-chat",
  7. metadata={
  8. "help": "The pretrained language model to use. Default is 'deepseek-chat'."
  9. },
  10. )
  11. open_api_user_role: str = field(
  12. default="user",
  13. metadata={
  14. "help": "Role assigned to the user in the chat context. Default is 'user'."
  15. },
  16. )
  17. open_api_init_chat_role: str = field(
  18. default="system",
  19. metadata={
  20. "help": "Initial role for setting up the chat context. Default is 'system'."
  21. },
  22. )
  23. open_api_init_chat_prompt: str = field(
  24. # default="You are a helpful and friendly AI assistant. You are polite, respectful, and aim to provide concise responses of less than 20 words.",
  25. default="You are a helpful and friendly AI assistant. You are polite, respectful, and aim to provide concise responses of less than 20 words.",
  26. metadata={
  27. "help": "The initial chat prompt to establish context for the language model. Default is 'You are a helpful AI assistant.'"
  28. },
  29. )
  30. open_api_chat_size: int = field(
  31. default=2,
  32. metadata={
  33. "help": "Number of interactions assitant-user to keep for the chat. None for no limitations."
  34. },
  35. )
  36. open_api_api_key: str = field(
  37. default=None,
  38. metadata={
  39. "help": "Is a unique code used to authenticate and authorize access to an API.Default is None"
  40. },
  41. )
  42. open_api_base_url: str = field(
  43. default=None,
  44. metadata={
  45. "help": "Is the root URL for all endpoints of an API, serving as the starting point for constructing API request.Default is Non"
  46. },
  47. )
  48. open_api_stream: bool = field(
  49. default=False,
  50. metadata={
  51. "help": "The stream parameter typically indicates whether data should be transmitted in a continuous flow rather"
  52. " than in a single, complete response, often used for handling large or real-time data.Default is False"
  53. },
  54. )