Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EthanAlmloff/unwrap_or_ai
/ functions
Functions
35 in github.com/EthanAlmloff/unwrap_or_ai
⨍
Functions
35
◇
Types & classes
16
↓ 2 callers
Method
unwrap_or_ai_impl
(self, prompt: String)
src/unwrap_or_ai.rs:13
↓ 1 callers
Method
chat_completion_structured
Structured chat completion - returns a typed response based on JSON schema Only works with models that support structured output: - openai/gpt-oss-20b
src/groq_client.rs:132
↓ 1 callers
Method
chat_completion_typed
Structured chat completion using JsonSchema trait - automatically generates JSON schema Only works with models that support structured output: - opena
src/groq_client.rs:104
Function
analyze_service_logs
(service_name: &str, hours: u32)
examples/devops_monitoring.rs:63
Function
assert_deserialize
This test ensures our types implement the required traits
src/lib.rs:281
Function
assert_serialize
()
src/lib.rs:282
Function
call_ai_for_type
Helper function to call AI and deserialize to specific type T
src/unwrap_or_ai.rs:55
Method
chat_completion_simple
Simple chat completion - returns just the text content
src/groq_client.rs:54
Function
check_service_health
(service_name: &str)
examples/devops_monitoring.rs:77
Method
create_simple_schema
Helper function to create a JSON schema for simple types
src/groq_client.rs:190
Function
fetch_user_from_database
(user_id: u32)
examples/ecommerce_demo.rs:38
Function
fetch_user_from_database
(user_id: u32)
examples/readme_example.rs:17
Function
get_deployment_status
(environment: &str)
examples/devops_monitoring.rs:85
Function
get_optional_product_none
(_id: u32)
src/lib.rs:120
Function
get_optional_product_some
(id: u32)
src/lib.rs:100
Function
get_user_failure
(id: u32)
src/lib.rs:85
Function
get_user_preferences
(user_id: u32, preference_type: &str)
src/lib.rs:137
Function
get_user_preferences
(user_id: u32)
examples/ecommerce_demo.rs:74
Function
get_user_success
(id: u32)
src/lib.rs:65
Function
get_weather_data
(city: &str)
examples/ecommerce_demo.rs:65
Function
load_service_config
(service_name: &str)
examples/devops_monitoring.rs:53
Function
main
()
examples/ecommerce_demo.rs:81
Function
main
()
examples/devops_monitoring.rs:92
Function
main
()
examples/readme_example.rs:22
Method
new
Create a new Groq client with the given API key
src/groq_client.rs:45
Function
process_payment
(amount: f64, user_id: u32)
examples/ecommerce_demo.rs:52
Function
test_ai_with_complex_context
()
src/lib.rs:215
Function
test_source_code_generation_for_test_functions
()
src/lib.rs:267
Function
test_trait_implementation_structure
()
src/lib.rs:238
Function
test_type_constraints
()
src/lib.rs:279
Function
test_unwrap_or_ai_with_real_api_call_failed_result
()
src/lib.rs:165
Function
test_unwrap_or_ai_with_real_api_call_none_option
()
src/lib.rs:188
Function
test_unwrap_or_ai_with_successful_option
()
src/lib.rs:155
Function
test_unwrap_or_ai_with_successful_result
()
src/lib.rs:145
Function
unwrap_or_ai_func
(_attr: TokenStream, item: TokenStream)
unwrap_or_ai_proc_macro/src/lib.rs:6