Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Ali-Parandeh/building-generative-ai-services
/ functions
Functions
252 in github.com/Ali-Parandeh/building-generative-ai-services
⨍
Functions
252
◇
Types & classes
75
↳
Endpoints
80
↓ 20 callers
Method
create
(self, record: Any)
examples/ch07/7-7.py:17
↓ 14 callers
Method
get
(self, token_id: int)
examples/ch08/8-8.py:21
↓ 13 callers
Method
get
(self, uid: int)
examples/ch07/7-7.py:13
↓ 8 callers
Function
count_tokens
(text: str | None)
app/utils.py:72
↓ 6 callers
Method
create
( self, collection_name: str, embedding_vector: list[float], original_text: st
examples/ch05/5-11.py:45
↓ 6 callers
Function
generate_text
(pipe: Pipeline, prompt: str, temperature: float = 0.7)
app/models.py:44
↓ 6 callers
Function
load_image_model
()
app/models.py:82
↓ 4 callers
Method
send
(message: str | bytes | list | dict, websocket: WebSocket)
examples/ch06/6-12.py:23
↓ 3 callers
Method
chat_stream
( self, prompt: str, model: str = "gpt-3.5-turbo" )
examples/ch06/6-2.py:18
↓ 3 callers
Method
create_collection
(self, collection_name: str, size: int)
examples/ch05/5-11.py:13
↓ 3 callers
Function
generate_image
( pipe: StableDiffusionInpaintPipelineLegacy, prompt: str )
app/models.py:89
↓ 3 callers
Function
img_to_bytes
(image: Image.Image, img_format: Literal["PNG", "JPEG"] = "PNG")
app/utils.py:31
↓ 3 callers
Method
invoke
(self, user_query: str)
examples/ch09/9-2.py:15
↓ 3 callers
Function
task
()
examples/ch05/5-2.py:5
↓ 2 callers
Method
ask
(self, query: str)
examples/ch10/10-8.py:25
↓ 2 callers
Function
audio_array_to_buffer
(audio_array: np.ndarray, sample_rate: int)
app/utils.py:18
↓ 2 callers
Method
connect
(self, websocket: WebSocket)
examples/ch06/6-12.py:10
↓ 2 callers
Function
count_tokens
(text: str | None)
examples/ch04/4-2.py:13
↓ 2 callers
Method
create
(self, token: TokenCreate)
examples/ch08/8-8.py:28
↓ 2 callers
Method
delete
(self, uid: int)
examples/ch07/7-7.py:25
↓ 2 callers
Method
disconnect
(self, websocket: WebSocket)
examples/ch06/6-12.py:14
↓ 2 callers
Function
embed
(text: str)
examples/ch05/5-10.py:30
↓ 2 callers
Function
export_to_video_buffer
(images: list[Image.Image])
app/utils.py:37
↓ 2 callers
Function
generate_3d_geometry
( pipe: ShapEPipeline, prompt: str, num_inference_steps: int )
app/models.py:122
↓ 2 callers
Function
generate_audio
( processor: BarkProcessor, model: BarkModel, prompt: str, preset: VoicePresets, )
app/models.py:70
↓ 2 callers
Function
generate_video
( pipe: StableVideoDiffusionPipeline, image: Image.Image, num_frames: int = 25 )
app/models.py:106
↓ 2 callers
Method
get
(self, conversation_id: int)
examples/ch07/7-8.py:21
↓ 2 callers
Function
load_3d_model
()
app/models.py:117
↓ 2 callers
Function
load_audio_model
()
app/models.py:64
↓ 2 callers
Function
load_text_model
()
app/models.py:34
↓ 2 callers
Function
load_video_model
()
app/models.py:96
↓ 2 callers
Function
mesh_to_obj_buffer
(mesh: MeshDecoderOutput)
app/utils.py:54
↓ 2 callers
Method
receive
(websocket: WebSocket)
examples/ch06/6-12.py:19
↓ 2 callers
Function
save_file
(file: UploadFile)
examples/ch05/5-8.py:11
↓ 2 callers
Method
search
(self, query_vector: list[float])
examples/ch10/10-6.py:32
↓ 2 callers
Function
timestamp_to_isostring
(date: int)
examples/ch04/4-1.py:4
↓ 2 callers
Method
update
( self, token_id: int, updated_token: TokenUpdate )
examples/ch08/8-8.py:36
↓ 1 callers
Method
chat_stream
( self, prompt: str, mode: str = "sse", model: str = "gpt-3.5-turbo" )
examples/ch09/9-12.py:15
↓ 1 callers
Function
clean
(text: str)
examples/ch05/5-10.py:20
↓ 1 callers
Method
delete_collection
(self, name: str)
examples/ch05/5-11.py:41
↓ 1 callers
Function
extract_urls
(text: str)
examples/ch05/5-6.py:11
↓ 1 callers
Function
fetch
(session: aiohttp.ClientSession, url: str)
examples/ch05/5-6.py:25
↓ 1 callers
Function
fetch_all
(urls: list[str])
examples/ch05/5-6.py:31
↓ 1 callers
Function
g_eval_moderate_content
( chat_response: str, threshold: int = 3 )
examples/ch09/9-5.py:14
↓ 1 callers
Method
generate
(self, prompt: str)
app/bento.py:13
↓ 1 callers
Method
generate
(self, prompt: str)
examples/ch03/3-18.py:15
↓ 1 callers
Function
generate_text
(prompt: str, temperature: float = 0.7)
examples/ch05/5-16.py:9
↓ 1 callers
Method
get_embedding
(self, question)
examples/ch10/10-8.py:18
↓ 1 callers
Method
get_password_hash
(self, password: str)
examples/ch08/8-6.py:16
↓ 1 callers
Function
init_db
()
examples/ch07/7-3.py:12
↓ 1 callers
Method
insert
( self, query_vector: list[float], documents: list[str] )
examples/ch10/10-6.py:20
↓ 1 callers
Function
is_topic_allowed
(user_query: str)
examples/ch09/9-2.py:43
↓ 1 callers
Function
is_valid_inference_step
( num_inference_steps: int, model: SupportedImageModels )
app/schemas.py:43
↓ 1 callers
Function
is_valid_inference_step
( num_inference_steps: int, model: SupportedModels )
examples/ch04/4-9.py:31
↓ 1 callers
Method
list
(self)
examples/ch07/7-7.py:9
↓ 1 callers
Method
list_messages
(self, conversation_id: int)
examples/ch07/7-10.py:9
↓ 1 callers
Function
load
(filepath: str)
examples/ch05/5-10.py:14
↓ 1 callers
Function
main
()
examples/ch05/5-3.py:4
↓ 1 callers
Function
main
()
examples/ch10/10-9.py:1
↓ 1 callers
Function
parse_inner_text
(html_string: str)
examples/ch05/5-6.py:17
↓ 1 callers
Method
search
( self, collection_name: str, query_vector: list[float], retrieval_limit: int,
examples/ch05/5-11.py:70
↓ 1 callers
Function
sleep
(ms)
examples/ch06/6-11.js:3
↓ 1 callers
Function
spawn_tasks
()
examples/ch05/5-2.py:11
↓ 1 callers
Function
task
()
examples/ch05/5-1.py:4
↓ 1 callers
Method
update
(self, uid: int, record: Any)
examples/ch07/7-7.py:21
↓ 1 callers
Method
verify_password
( self, password: str, hashed_password: str )
examples/ch08/8-6.py:11
Method
__init__
(self)
app/bento.py:9
Method
__init__
(self, session: AsyncSession)
examples/ch08/8-8.py:11
Method
__init__
(self, session: DBSessionDep)
examples/ch08/8-10.py:20
Method
__init__
(self, system_prompt: str)
examples/ch09/9-2.py:11
Method
__init__
(self, throttle_rate=0.5)
examples/ch09/9-12.py:11
Method
__init__
(self)
examples/ch03/3-18.py:11
Method
__init__
(self)
examples/ch05/5-12.py:11
Method
__init__
(self, host: str = "localhost", port: int = 6333)
examples/ch05/5-11.py:10
Method
__init__
(self)
examples/ch10/10-6.py:8
Method
__init__
(self, threshold: float = 0.35)
examples/ch10/10-8.py:10
Method
__init__
(self, host="localhost", port=6333)
examples/ch10/10-7.py:8
Method
__init__
(self)
examples/ch06/6-12.py:7
Method
__init__
(self)
examples/ch06/6-2.py:10
Method
__init__
(self)
examples/ch06/6-14.py:8
Method
__init__
(self, session: AsyncSession)
examples/ch07/7-8.py:11
Function
async_generate_text
(prompt: str = Body(...))
examples/ch05/5-4.py:26
Function
audio_array_to_buffer
(audio_array: np.array, sample_rate: int)
examples/ch03/3-5.py:8
Function
authenticate_user
( credentials: Annotated[HTTPBasicCredentials, Depends(security)] )
examples/ch08/8-1.py:13
Method
authenticate_user
(self, form_data: LoginFormDep)
examples/ch08/8-10.py:35
Function
authorization_controller
( user: CurrentUserDep, resource: ResourceDep, action: ActionRep )
examples/ch08/8-22.py:24
Function
authorize
( user: CurrentUserDep, resource: ResourceDep, team: TeamMembershipRep )
examples/ch08/8-21.py:14
Function
batch_generate_image
(prompt: str, count: int)
examples/ch05/5-18.py:11
Function
block_server_controller
()
examples/ch05/5-5.py:12
Method
broadcast
(self, message: str | bytes | list | dict)
examples/ch06/6-13.py:7
Function
calculate_usage_costs
( prompt: str, response: str | None, model: SupportedModel, )
app/utils.py:80
Function
calculate_usage_costs
( prompt: str, response: str | None, model: SupportedModels, )
examples/ch04/4-2.py:21
Function
calculate_usage_costs
(message: Message)
examples/ch04/4-4.py:30
Function
chat_controller
(prompt: str = "Inspire me")
app/main.py:99
Function
chat_controller
(prompt: str = "Inspire me")
examples/ch02/2-1.py:14
Function
chat_stream
(prompt: str)
examples/ch06/6-8.py:10
Method
chat_stream
( self, prompt: str, mode: str = "sse", model: str = "gpt-3.5-turbo" )
examples/ch06/6-14.py:11
Function
check_classification_response
(value: str | None)
examples/ch09/9-2.py:28
Function
check_csrf_state
(request: Request, state: str)
examples/ch08/8-16.py:12
Function
check_health_controller
(request: Request, ...)
examples/ch09/9-7.py:15
next →
1–100 of 252, ranked by callers