Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CraftJarvis/RAT
/ functions
Functions
23 in github.com/CraftJarvis/RAT
⨍
Functions
23
◇
Types & classes
0
↓ 4 callers
Function
num_tokens_from_string
Returns the number of tokens in a text string.
app/gradio_app.py:38
↓ 4 callers
Function
run_with_timeout
(func, timeout, *args, **kwargs)
app/gradio_app.py:292
↓ 1 callers
Function
chunk_texts
trunk the text into n parts, return a list of text [text, text, text]
app/gradio_app.py:74
↓ 1 callers
Function
generate_diff_html
(text1, text2)
app/gradio_app.py:312
↓ 1 callers
Function
get_content
(query)
app/gradio_app.py:201
↓ 1 callers
Function
get_draft
(question)
app/gradio_app.py:111
↓ 1 callers
Function
get_page_content
(link:str)
app/gradio_app.py:27
↓ 1 callers
Function
get_query
(question, answer)
app/gradio_app.py:172
↓ 1 callers
Function
get_reflect_answer
(question, answer)
app/gradio_app.py:248
↓ 1 callers
Function
get_revise_answer
(question, answer, content)
app/gradio_app.py:217
↓ 1 callers
Function
get_search
(query:str="", k:int=1)
app/gradio_app.py:10
↓ 1 callers
Function
split_draft
(draft, split_char = '\n\n')
app/gradio_app.py:137
↓ 1 callers
Function
split_draft_openai
(question, answer, NUM_PARAGRAPHS = 4)
app/gradio_app.py:145
Function
chunk_text_by_sentence
Chunk the $text into sentences with less than 2k tokens.
app/gradio_app.py:44
Function
chunk_text_front
get the first `trunk_size` token of text
app/gradio_app.py:61
Function
clear_func
()
app/gradio_app.py:405
Function
get_content_wrapper
(q, query)
app/gradio_app.py:279
Function
get_query_wrapper
(q, question, answer)
app/gradio_app.py:275
Function
get_reflect_answer_wrapper
(q, question, answer)
app/gradio_app.py:287
Function
get_revise_answer_wrapper
(q, question, answer, content)
app/gradio_app.py:283
Function
rat
(question)
app/gradio_app.py:331
Function
search_results
(query)
app/gradio_app.py:12
Function
set_openai_api_key
(api_key)
app/gradio_app.py:408