models.py 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  1. from __future__ import annotations
  2. from dataclasses import dataclass
  3. from .Provider import IterListProvider, ProviderType
  4. from .Provider import (
  5. Blackbox,
  6. Blackbox2,
  7. BingCreateImages,
  8. ChatGpt,
  9. ChatGptEs,
  10. Cloudflare,
  11. Copilot,
  12. CopilotAccount,
  13. DarkAI,
  14. DDG,
  15. DeepInfraChat,
  16. Flux,
  17. GigaChat,
  18. Gemini,
  19. GeminiPro,
  20. HuggingChat,
  21. HuggingFace,
  22. Liaobots,
  23. Mhystical,
  24. Airforce,
  25. MetaAI,
  26. MicrosoftDesigner,
  27. OpenaiChat,
  28. OpenaiAccount,
  29. PerplexityLabs,
  30. Pi,
  31. Pizzagpt,
  32. PollinationsAI,
  33. Reka,
  34. ReplicateHome,
  35. RubiksAI,
  36. TeachAnything,
  37. )
  38. @dataclass(unsafe_hash=True)
  39. class Model:
  40. """
  41. Represents a machine learning model configuration.
  42. Attributes:
  43. name (str): Name of the model.
  44. base_provider (str): Default provider for the model.
  45. best_provider (ProviderType): The preferred provider for the model, typically with retry logic.
  46. """
  47. name: str
  48. base_provider: str
  49. best_provider: ProviderType = None
  50. @staticmethod
  51. def __all__() -> list[str]:
  52. """Returns a list of all model names."""
  53. return _all_models
  54. class ImageModel(Model):
  55. pass
  56. ### Default ###
  57. default = Model(
  58. name = "",
  59. base_provider = "",
  60. best_provider = IterListProvider([
  61. DDG,
  62. Pizzagpt,
  63. Blackbox2,
  64. Blackbox,
  65. Copilot,
  66. DeepInfraChat,
  67. Airforce,
  68. Cloudflare,
  69. PollinationsAI,
  70. ChatGptEs,
  71. OpenaiChat,
  72. Mhystical,
  73. RubiksAI,
  74. ])
  75. )
  76. ############
  77. ### Text ###
  78. ############
  79. ### OpenAI ###
  80. # gpt-3.5
  81. gpt_35_turbo = Model(
  82. name = 'gpt-3.5-turbo',
  83. base_provider = 'OpenAI',
  84. best_provider = IterListProvider([DarkAI, ChatGpt])
  85. )
  86. # gpt-4
  87. gpt_4 = Model(
  88. name = 'gpt-4',
  89. base_provider = 'OpenAI',
  90. best_provider = IterListProvider([DDG, Blackbox, ChatGptEs, PollinationsAI, Copilot, OpenaiChat, Liaobots, Airforce, Mhystical])
  91. )
  92. gpt_4_turbo = Model(
  93. name = 'gpt-4-turbo',
  94. base_provider = 'OpenAI',
  95. best_provider = Airforce
  96. )
  97. # gpt-4o
  98. gpt_4o = Model(
  99. name = 'gpt-4o',
  100. base_provider = 'OpenAI',
  101. best_provider = IterListProvider([Blackbox, ChatGptEs, PollinationsAI, DarkAI, ChatGpt, Airforce, Liaobots, OpenaiChat])
  102. )
  103. gpt_4o_mini = Model(
  104. name = 'gpt-4o-mini',
  105. base_provider = 'OpenAI',
  106. best_provider = IterListProvider([DDG, ChatGptEs, Pizzagpt, ChatGpt, Airforce, RubiksAI, Liaobots, OpenaiChat])
  107. )
  108. # o1
  109. o1_preview = Model(
  110. name = 'o1-preview',
  111. base_provider = 'OpenAI',
  112. best_provider = Liaobots
  113. )
  114. o1_mini = Model(
  115. name = 'o1-mini',
  116. base_provider = 'OpenAI',
  117. best_provider = IterListProvider([Liaobots, Airforce])
  118. )
  119. ### GigaChat ###
  120. gigachat = Model(
  121. name = 'GigaChat:latest',
  122. base_provider = 'gigachat',
  123. best_provider = GigaChat
  124. )
  125. ### Meta ###
  126. meta = Model(
  127. name = "meta-ai",
  128. base_provider = "Meta",
  129. best_provider = MetaAI
  130. )
  131. # llama 2
  132. llama_2_7b = Model(
  133. name = "llama-2-7b",
  134. base_provider = "Meta Llama",
  135. best_provider = IterListProvider([Cloudflare, Airforce])
  136. )
  137. # llama 3
  138. llama_3_8b = Model(
  139. name = "llama-3-8b",
  140. base_provider = "Meta Llama",
  141. best_provider = Cloudflare
  142. )
  143. # llama 3.1
  144. llama_3_1_8b = Model(
  145. name = "llama-3.1-8b",
  146. base_provider = "Meta Llama",
  147. best_provider = IterListProvider([Blackbox, DeepInfraChat, Cloudflare, Airforce, PerplexityLabs])
  148. )
  149. llama_3_1_70b = Model(
  150. name = "llama-3.1-70b",
  151. base_provider = "Meta Llama",
  152. best_provider = IterListProvider([DDG, DeepInfraChat, Blackbox, Blackbox2, TeachAnything, PollinationsAI, DarkAI, Airforce, RubiksAI, PerplexityLabs])
  153. )
  154. llama_3_1_405b = Model(
  155. name = "llama-3.1-405b",
  156. base_provider = "Meta Llama",
  157. best_provider = Blackbox
  158. )
  159. # llama 3.2
  160. llama_3_2_1b = Model(
  161. name = "llama-3.2-1b",
  162. base_provider = "Meta Llama",
  163. best_provider = Cloudflare
  164. )
  165. llama_3_2_11b = Model(
  166. name = "llama-3.2-11b",
  167. base_provider = "Meta Llama",
  168. best_provider = IterListProvider([HuggingChat, HuggingFace])
  169. )
  170. # llama 3.3
  171. llama_3_3_70b = Model(
  172. name = "llama-3.3-70b",
  173. base_provider = "Meta Llama",
  174. best_provider = IterListProvider([Blackbox, HuggingChat, HuggingFace, PerplexityLabs])
  175. )
  176. ### Mistral ###
  177. mixtral_7b = Model(
  178. name = "mixtral-7b",
  179. base_provider = "Mistral",
  180. best_provider = Blackbox
  181. )
  182. mixtral_8x7b = Model(
  183. name = "mixtral-8x7b",
  184. base_provider = "Mistral",
  185. best_provider = DDG
  186. )
  187. mistral_nemo = Model(
  188. name = "mistral-nemo",
  189. base_provider = "Mistral",
  190. best_provider = IterListProvider([PollinationsAI, HuggingChat, HuggingFace])
  191. )
  192. mistral_large = Model(
  193. name = "mistral-large",
  194. base_provider = "Mistral",
  195. best_provider = PollinationsAI
  196. )
  197. ### NousResearch ###
  198. hermes_2_dpo = Model(
  199. name = "hermes-2-dpo",
  200. base_provider = "NousResearch",
  201. best_provider = IterListProvider([Blackbox, Airforce])
  202. )
  203. hermes_2_pro = Model(
  204. name = "hermes-2-pro",
  205. base_provider = "NousResearch",
  206. best_provider = Airforce
  207. )
  208. hermes_3 = Model(
  209. name = "hermes-3",
  210. base_provider = "NousResearch",
  211. best_provider = IterListProvider([HuggingChat, HuggingFace])
  212. )
  213. ### Microsoft ###
  214. phi_2 = Model(
  215. name = "phi-2",
  216. base_provider = "Microsoft",
  217. best_provider = Airforce
  218. )
  219. phi_3_5_mini = Model(
  220. name = "phi-3.5-mini",
  221. base_provider = "Microsoft",
  222. best_provider = IterListProvider([HuggingChat, HuggingFace])
  223. )
  224. ### Google DeepMind ###
  225. # gemini
  226. gemini_pro = Model(
  227. name = 'gemini-pro',
  228. base_provider = 'Google DeepMind',
  229. best_provider = IterListProvider([Blackbox, Gemini, GeminiPro, Liaobots])
  230. )
  231. gemini_flash = Model(
  232. name = 'gemini-flash',
  233. base_provider = 'Google DeepMind',
  234. best_provider = IterListProvider([Blackbox, Gemini, GeminiPro, Liaobots])
  235. )
  236. gemini = Model(
  237. name = 'gemini',
  238. base_provider = 'Google DeepMind',
  239. best_provider = Gemini
  240. )
  241. # gemma
  242. gemma_2b = Model(
  243. name = 'gemma-2b',
  244. base_provider = 'Google',
  245. best_provider = ReplicateHome
  246. )
  247. ### Anthropic ###
  248. # claude 3
  249. claude_3_opus = Model(
  250. name = 'claude-3-opus',
  251. base_provider = 'Anthropic',
  252. best_provider = Liaobots
  253. )
  254. claude_3_sonnet = Model(
  255. name = 'claude-3-sonnet',
  256. base_provider = 'Anthropic',
  257. best_provider = Liaobots
  258. )
  259. claude_3_haiku = Model(
  260. name = 'claude-3-haiku',
  261. base_provider = 'Anthropic',
  262. best_provider = DDG
  263. )
  264. # claude 3.5
  265. claude_3_5_sonnet = Model(
  266. name = 'claude-3.5-sonnet',
  267. base_provider = 'Anthropic',
  268. best_provider = IterListProvider([Blackbox, PollinationsAI, Liaobots])
  269. )
  270. ### Reka AI ###
  271. reka_core = Model(
  272. name = 'reka-core',
  273. base_provider = 'Reka AI',
  274. best_provider = Reka
  275. )
  276. ### Blackbox AI ###
  277. blackboxai = Model(
  278. name = 'blackboxai',
  279. base_provider = 'Blackbox AI',
  280. best_provider = Blackbox
  281. )
  282. blackboxai_pro = Model(
  283. name = 'blackboxai-pro',
  284. base_provider = 'Blackbox AI',
  285. best_provider = Blackbox
  286. )
  287. ### CohereForAI ###
  288. command_r_plus = Model(
  289. name = 'command-r-plus',
  290. base_provider = 'CohereForAI',
  291. best_provider = HuggingChat
  292. )
  293. command_r = Model(
  294. name = 'command-r',
  295. base_provider = 'CohereForAI',
  296. best_provider = PollinationsAI
  297. )
  298. ### Qwen ###
  299. # qwen 1_5
  300. qwen_1_5_7b = Model(
  301. name = 'qwen-1.5-7b',
  302. base_provider = 'Qwen',
  303. best_provider = Cloudflare
  304. )
  305. # qwen 2
  306. qwen_2_72b = Model(
  307. name = 'qwen-2-72b',
  308. base_provider = 'Qwen',
  309. best_provider = DeepInfraChat
  310. )
  311. # qwen 2.5
  312. qwen_2_5_72b = Model(
  313. name = 'qwen-2.5-72b',
  314. base_provider = 'Qwen',
  315. best_provider = IterListProvider([HuggingChat, HuggingFace])
  316. )
  317. qwen_2_5_coder_32b = Model(
  318. name = 'qwen-2.5-coder-32b',
  319. base_provider = 'Qwen',
  320. best_provider = IterListProvider([DeepInfraChat, PollinationsAI, HuggingChat, HuggingFace])
  321. )
  322. qwq_32b = Model(
  323. name = 'qwq-32b',
  324. base_provider = 'Qwen',
  325. best_provider = IterListProvider([DeepInfraChat, Blackbox, HuggingChat, HuggingFace])
  326. )
  327. ### Inflection ###
  328. pi = Model(
  329. name = 'pi',
  330. base_provider = 'Inflection',
  331. best_provider = Pi
  332. )
  333. ### DeepSeek ###
  334. deepseek_chat = Model(
  335. name = 'deepseek-chat',
  336. base_provider = 'DeepSeek',
  337. best_provider = Blackbox
  338. )
  339. deepseek_coder = Model(
  340. name = 'deepseek-coder',
  341. base_provider = 'DeepSeek',
  342. best_provider = Airforce
  343. )
  344. ### WizardLM ###
  345. wizardlm_2_8x22b = Model(
  346. name = 'wizardlm-2-8x22b',
  347. base_provider = 'WizardLM',
  348. best_provider = DeepInfraChat
  349. )
  350. ### OpenChat ###
  351. openchat_3_5 = Model(
  352. name = 'openchat-3.5',
  353. base_provider = 'OpenChat',
  354. best_provider = Airforce
  355. )
  356. ### x.ai ###
  357. grok_beta = Model(
  358. name = 'grok-beta',
  359. base_provider = 'x.ai',
  360. best_provider = Liaobots
  361. )
  362. ### Perplexity AI ###
  363. sonar_online = Model(
  364. name = 'sonar-online',
  365. base_provider = 'Perplexity AI',
  366. best_provider = PerplexityLabs
  367. )
  368. sonar_chat = Model(
  369. name = 'sonar-chat',
  370. base_provider = 'Perplexity AI',
  371. best_provider = PerplexityLabs
  372. )
  373. ### Nvidia ###
  374. nemotron_70b = Model(
  375. name = 'nemotron-70b',
  376. base_provider = 'Nvidia',
  377. best_provider = IterListProvider([DeepInfraChat, HuggingChat, HuggingFace])
  378. )
  379. ### Teknium ###
  380. openhermes_2_5 = Model(
  381. name = 'openhermes-2.5',
  382. base_provider = 'Teknium',
  383. best_provider = Airforce
  384. )
  385. ### Liquid ###
  386. lfm_40b = Model(
  387. name = 'lfm-40b',
  388. base_provider = 'Liquid',
  389. best_provider = IterListProvider([Airforce, PerplexityLabs])
  390. )
  391. ### DiscoResearch ###
  392. german_7b = Model(
  393. name = 'german-7b',
  394. base_provider = 'DiscoResearch',
  395. best_provider = Airforce
  396. )
  397. ### HuggingFaceH4 ###
  398. zephyr_7b = Model(
  399. name = 'zephyr-7b',
  400. base_provider = 'HuggingFaceH4',
  401. best_provider = Airforce
  402. )
  403. ### Inferless ###
  404. neural_7b = Model(
  405. name = 'neural-7b',
  406. base_provider = 'Inferless',
  407. best_provider = Airforce
  408. )
  409. ### Databricks ###
  410. dbrx_instruct = Model(
  411. name = 'dbrx-instruct',
  412. base_provider = 'Databricks',
  413. best_provider = Blackbox
  414. )
  415. ### PollinationsAI ###
  416. p1 = Model(
  417. name = 'p1',
  418. base_provider = 'PollinationsAI',
  419. best_provider = PollinationsAI
  420. )
  421. ### Uncensored AI ###
  422. evil = Model(
  423. name = 'evil',
  424. base_provider = 'Evil Mode - Experimental',
  425. best_provider = IterListProvider([PollinationsAI, Airforce])
  426. )
  427. ### Other ###
  428. midijourney = Model(
  429. name = 'midijourney',
  430. base_provider = 'Other',
  431. best_provider = PollinationsAI
  432. )
  433. turbo = Model(
  434. name = 'turbo',
  435. base_provider = 'Other',
  436. best_provider = PollinationsAI
  437. )
  438. unity = Model(
  439. name = 'unity',
  440. base_provider = 'Other',
  441. best_provider = PollinationsAI
  442. )
  443. rtist = Model(
  444. name = 'rtist',
  445. base_provider = 'Other',
  446. best_provider = PollinationsAI
  447. )
  448. #############
  449. ### Image ###
  450. #############
  451. ### Stability AI ###
  452. sdxl = ImageModel(
  453. name = 'sdxl',
  454. base_provider = 'Stability AI',
  455. best_provider = IterListProvider([ReplicateHome, Airforce])
  456. )
  457. sd_3 = ImageModel(
  458. name = 'sd-3',
  459. base_provider = 'Stability AI',
  460. best_provider = ReplicateHome
  461. )
  462. ### Playground ###
  463. playground_v2_5 = ImageModel(
  464. name = 'playground-v2.5',
  465. base_provider = 'Playground AI',
  466. best_provider = ReplicateHome
  467. )
  468. ### Flux AI ###
  469. flux = ImageModel(
  470. name = 'flux',
  471. base_provider = 'Flux AI',
  472. best_provider = IterListProvider([Blackbox, Blackbox2, PollinationsAI, Airforce])
  473. )
  474. flux_pro = ImageModel(
  475. name = 'flux-pro',
  476. base_provider = 'Flux AI',
  477. best_provider = IterListProvider([PollinationsAI, Airforce])
  478. )
  479. flux_dev = ImageModel(
  480. name = 'flux-dev',
  481. base_provider = 'Flux AI',
  482. best_provider = IterListProvider([Flux, HuggingChat, HuggingFace])
  483. )
  484. flux_realism = ImageModel(
  485. name = 'flux-realism',
  486. base_provider = 'Flux AI',
  487. best_provider = IterListProvider([PollinationsAI, Airforce])
  488. )
  489. flux_cablyai = ImageModel(
  490. name = 'flux-cablyai',
  491. base_provider = 'Flux AI',
  492. best_provider = PollinationsAI
  493. )
  494. flux_anime = ImageModel(
  495. name = 'flux-anime',
  496. base_provider = 'Flux AI',
  497. best_provider = IterListProvider([PollinationsAI, Airforce])
  498. )
  499. flux_3d = ImageModel(
  500. name = 'flux-3d',
  501. base_provider = 'Flux AI',
  502. best_provider = IterListProvider([PollinationsAI, Airforce])
  503. )
  504. flux_disney = ImageModel(
  505. name = 'flux-disney',
  506. base_provider = 'Flux AI',
  507. best_provider = Airforce
  508. )
  509. flux_pixel = ImageModel(
  510. name = 'flux-pixel',
  511. base_provider = 'Flux AI',
  512. best_provider = Airforce
  513. )
  514. flux_4o = ImageModel(
  515. name = 'flux-4o',
  516. base_provider = 'Flux AI',
  517. best_provider = Airforce
  518. )
  519. ### OpenAI ###
  520. dall_e_3 = ImageModel(
  521. name = 'dall-e-3',
  522. base_provider = 'OpenAI',
  523. best_provider = IterListProvider([Airforce, PollinationsAI, CopilotAccount, OpenaiAccount, MicrosoftDesigner, BingCreateImages])
  524. )
  525. ### Midjourney ###
  526. midjourney = ImageModel(
  527. name = 'midjourney',
  528. base_provider = 'Midjourney',
  529. best_provider = IterListProvider([PollinationsAI, Airforce])
  530. )
  531. ### Other ###
  532. any_dark = ImageModel(
  533. name = 'any-dark',
  534. base_provider = 'Other',
  535. best_provider = IterListProvider([PollinationsAI, Airforce])
  536. )
  537. class ModelUtils:
  538. """
  539. Utility class for mapping string identifiers to Model instances.
  540. Attributes:
  541. convert (dict[str, Model]): Dictionary mapping model string identifiers to Model instances.
  542. """
  543. convert: dict[str, Model] = {
  544. ############
  545. ### Text ###
  546. ############
  547. ### OpenAI ###
  548. # gpt-3
  549. 'gpt-3': gpt_35_turbo,
  550. # gpt-3.5
  551. gpt_35_turbo.name: gpt_35_turbo,
  552. # gpt-4
  553. gpt_4.name: gpt_4,
  554. gpt_4_turbo.name: gpt_4_turbo,
  555. # gpt-4o
  556. gpt_4o.name: gpt_4o,
  557. gpt_4o_mini.name: gpt_4o_mini,
  558. # o1
  559. o1_preview.name: o1_preview,
  560. o1_mini.name: o1_mini,
  561. ### Meta ###
  562. meta.name: meta,
  563. # llama-2
  564. llama_2_7b.name: llama_2_7b,
  565. # llama-3
  566. llama_3_8b.name: llama_3_8b,
  567. # llama-3.1
  568. llama_3_1_8b.name: llama_3_1_8b,
  569. llama_3_1_70b.name: llama_3_1_70b,
  570. llama_3_1_405b.name: llama_3_1_405b,
  571. # llama-3.2
  572. llama_3_2_1b.name: llama_3_2_1b,
  573. llama_3_2_11b.name: llama_3_2_11b,
  574. # llama-3.3
  575. llama_3_3_70b.name: llama_3_3_70b,
  576. ### Mistral ###
  577. mixtral_7b.name: mixtral_7b,
  578. mixtral_8x7b.name: mixtral_8x7b,
  579. mistral_nemo.name: mistral_nemo,
  580. mistral_large.name: mistral_large,
  581. ### NousResearch ###
  582. hermes_2_dpo.name: hermes_2_dpo,
  583. hermes_2_pro.name: hermes_2_pro,
  584. hermes_3.name: hermes_3,
  585. ### Microsoft ###
  586. phi_2.name: phi_2,
  587. phi_3_5_mini.name: phi_3_5_mini,
  588. ### Google ###
  589. # gemini
  590. gemini.name: gemini,
  591. gemini_pro.name: gemini_pro,
  592. gemini_flash.name: gemini_flash,
  593. # gemma
  594. gemma_2b.name: gemma_2b,
  595. ### Anthropic ###
  596. # claude 3
  597. claude_3_opus.name: claude_3_opus,
  598. claude_3_sonnet.name: claude_3_sonnet,
  599. claude_3_haiku.name: claude_3_haiku,
  600. # claude 3.5
  601. claude_3_5_sonnet.name: claude_3_5_sonnet,
  602. ### Reka AI ###
  603. reka_core.name: reka_core,
  604. ### Blackbox AI ###
  605. blackboxai.name: blackboxai,
  606. blackboxai_pro.name: blackboxai_pro,
  607. ### CohereForAI ###
  608. command_r_plus.name: command_r_plus,
  609. command_r.name: command_r,
  610. ### GigaChat ###
  611. gigachat.name: gigachat,
  612. ### Qwen ###
  613. # qwen 1_5
  614. qwen_1_5_7b.name: qwen_1_5_7b,
  615. # qwen 2
  616. qwen_2_72b.name: qwen_2_72b,
  617. # qwen 2.5
  618. qwen_2_5_72b.name: qwen_2_5_72b,
  619. qwen_2_5_coder_32b.name: qwen_2_5_coder_32b,
  620. qwq_32b.name: qwq_32b,
  621. ### Inflection ###
  622. pi.name: pi,
  623. ### WizardLM ###
  624. wizardlm_2_8x22b.name: wizardlm_2_8x22b,
  625. ### OpenChat ###
  626. openchat_3_5.name: openchat_3_5,
  627. ### x.ai ###
  628. grok_beta.name: grok_beta,
  629. ### Perplexity AI ###
  630. sonar_online.name: sonar_online,
  631. sonar_chat.name: sonar_chat,
  632. ### DeepSeek ###
  633. deepseek_chat.name: deepseek_chat,
  634. deepseek_coder.name: deepseek_coder,
  635. ### TheBloke ###
  636. german_7b.name: german_7b,
  637. ### Nvidia ###
  638. nemotron_70b.name: nemotron_70b,
  639. ### Teknium ###
  640. openhermes_2_5.name: openhermes_2_5,
  641. ### Liquid ###
  642. lfm_40b.name: lfm_40b,
  643. ### HuggingFaceH4 ###
  644. zephyr_7b.name: zephyr_7b,
  645. ### Inferless ###
  646. neural_7b.name: neural_7b,
  647. ### Databricks ###
  648. dbrx_instruct.name: dbrx_instruct,
  649. ### PollinationsAI ###
  650. p1.name: p1,
  651. ### Uncensored AI ###
  652. evil.name: evil,
  653. ### Other ###
  654. midijourney.name: midijourney,
  655. turbo.name: turbo,
  656. unity.name: unity,
  657. rtist.name: rtist,
  658. #############
  659. ### Image ###
  660. #############
  661. ### Stability AI ###
  662. sdxl.name: sdxl,
  663. sd_3.name: sd_3,
  664. ### Playground ###
  665. playground_v2_5.name: playground_v2_5,
  666. ### Flux AI ###
  667. flux.name: flux,
  668. flux_pro.name: flux_pro,
  669. flux_dev.name: flux_dev,
  670. flux_realism.name: flux_realism,
  671. flux_cablyai.name: flux_cablyai,
  672. flux_anime.name: flux_anime,
  673. flux_3d.name: flux_3d,
  674. flux_disney.name: flux_disney,
  675. flux_pixel.name: flux_pixel,
  676. flux_4o.name: flux_4o,
  677. ### OpenAI ###
  678. dall_e_3.name: dall_e_3,
  679. ### Midjourney ###
  680. midjourney.name: midjourney,
  681. ### Other ###
  682. any_dark.name: any_dark,
  683. }
  684. # Create a list of all models and his providers
  685. __models__ = {
  686. model.name: (model, providers)
  687. for model, providers in [
  688. (model, model.best_provider.providers
  689. if isinstance(model.best_provider, IterListProvider)
  690. else [model.best_provider]
  691. if model.best_provider is not None
  692. else [])
  693. for model in ModelUtils.convert.values()]
  694. }
  695. _all_models = list(__models__.keys())