1#![allow(unused_imports)]
3
4#[inline]
5pub fn is_test_mode() -> bool {
6 std::env::var("CARGO_RUNNING_TEST").is_ok()
10}
11
12pub use pretty_assertions::{assert_eq as pretty_assert_eq};
13pub use structopt::{self,StructOpt};
14pub use tokio::runtime::Runtime;
15pub use std::borrow::Cow;
16pub use strum::{self,VariantNames,IntoEnumIterator};
17pub use strum_macros::{Display as StrumDisplay, EnumIter, EnumString, EnumVariantNames};
18pub use once_cell::unsync::OnceCell;
19pub use async_openai::{
20 self,
21 types::{
22 Role,
23 ChatCompletionResponseMessage,
24 OpenAIFile,
25 Batch,
26 BatchCompletionWindow,
27 BatchEndpoint,
28 BatchRequest,
29 BatchRequestInput,
30 BatchRequestInputMethod,
31 BatchRequestOutput,
32 BatchStatus,
33 CreateFileRequest,
34 FilePurpose,
35 },
36 Client,
37 config::OpenAIConfig,
38 error::{OpenAIError, ApiError as OpenAIApiError},
39};
40pub use serde::{de,de::DeserializeOwned,Deserializer,Deserialize,Serialize,Serializer};
41pub use bytes::Bytes;
42
43pub use export_magic::*;
44
45pub use error_tree::*;
46pub use std::path::{PathBuf,Path};
47pub use std::fmt::{Formatter,Display,Debug,Result as FmtResult};
48pub use std::str::FromStr;
49pub use tokio::sync::mpsc::{channel,error::TrySendError,Sender,Receiver};
50pub use tokio::{
51 task::JoinSet,
52 fs::{self,File},
53 io::{self, AsyncBufReadExt, AsyncWriteExt, BufReader},
54 self,
55 sync::{
56 RwLock as AsyncRwLock,
57 RwLockReadGuard as AsyncRwLockReadGuard,
58 RwLockWriteGuard as AsyncRwLockWriteGuard,
59 Mutex as AsyncMutex,mpsc, oneshot, Semaphore,OwnedSemaphorePermit},
60 task::JoinHandle,
61 time::{Instant,sleep,Duration},
62};
63pub use indoc::{formatdoc,indoc};
64pub use std::iter::Enumerate;
65pub use std::slice::Chunks;
66pub use inflector::{Inflector,cases::snakecase::to_snake_case};
67pub use delegate::delegate;
68pub use regex::{self,Regex,Captures};
69pub use std::collections::{VecDeque,HashSet};
70pub use traced_test::traced_test;
71pub use tracing_setup::*;
72pub use tracing::{self,instrument,trace,info,debug,error,warn};
73pub use std::cell::RefCell;
74pub use std::rc::Rc;
75pub use tempfile::{self,NamedTempFile,tempdir,TempDir};
76pub use std::cmp::Ordering;
77pub use uuid::{self,Uuid};
78pub use std::sync::{RwLock,Arc};
79pub use std::ops::Deref;
80
81pub use futures::{self,future::join_all,executor::block_on};
82pub use serde_json::Value as JsonValue;
83pub use std::{
84 collections::HashMap,
85 io::{BufRead, BufWriter, Write},
86};
87
88pub use std::io::ErrorKind;
89pub use async_openai::types::{
90 OpenAIFilePurpose,
91 BatchRequestOutputResponse,
92 ChatCompletionRequestMessageContentPartImage,
93 ChatCompletionRequestUserMessageContent,
94 ImageDetail,
95 ImageUrl,
96};
97
98pub use export_magic::*;
99
100pub use pbx::arc;
101pub use std::error::Error;
102pub use disable_macro::*;
103pub use async_trait::async_trait;
104pub use serde_json::{self,Value,json};
105pub use strsim;
106pub use std::str::Chars;
107pub use std::iter::Peekable;
108pub use json_repair::*;
109pub use getset::*;
110pub use derive_builder::{Builder};
111pub use rand;
112
113pub use ai_descriptor::*;
114pub use rand_construct::*;
115pub use structured_language_form::*;
116pub use named_item::*;
117pub use named_item_derive::NamedItem;
118pub use std::thread::{self,ScopedJoinHandle,Scope};
119pub use std::sync::atomic::{AtomicI32,AtomicUsize, Ordering as AtomicOrdering};
120pub use crossbeam;
121pub use std::marker::PhantomData;
122pub use lazy_static::*;
123pub use std::sync::Mutex as StdMutex;
124pub use std::panic::{AssertUnwindSafe,catch_unwind};
125pub use float_ord::FloatOrd;
126pub use num_traits::Zero;
127pub use std::pin::Pin;