MCPcopy Create free account

hub / github.com/EthanAlmloff/unwrap_or_ai / functions

Functions35 in github.com/EthanAlmloff/unwrap_or_ai

↓ 2 callersMethodunwrap_or_ai_impl
(self, prompt: String)
src/unwrap_or_ai.rs:13
↓ 1 callersMethodchat_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 callersMethodchat_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
Functionanalyze_service_logs
(service_name: &str, hours: u32)
examples/devops_monitoring.rs:63
Functionassert_deserialize
This test ensures our types implement the required traits
src/lib.rs:281
Functionassert_serialize
()
src/lib.rs:282
Functioncall_ai_for_type
Helper function to call AI and deserialize to specific type T
src/unwrap_or_ai.rs:55
Methodchat_completion_simple
Simple chat completion - returns just the text content
src/groq_client.rs:54
Functioncheck_service_health
(service_name: &str)
examples/devops_monitoring.rs:77
Methodcreate_simple_schema
Helper function to create a JSON schema for simple types
src/groq_client.rs:190
Functionfetch_user_from_database
(user_id: u32)
examples/ecommerce_demo.rs:38
Functionfetch_user_from_database
(user_id: u32)
examples/readme_example.rs:17
Functionget_deployment_status
(environment: &str)
examples/devops_monitoring.rs:85
Functionget_optional_product_none
(_id: u32)
src/lib.rs:120
Functionget_optional_product_some
(id: u32)
src/lib.rs:100
Functionget_user_failure
(id: u32)
src/lib.rs:85
Functionget_user_preferences
(user_id: u32, preference_type: &str)
src/lib.rs:137
Functionget_user_preferences
(user_id: u32)
examples/ecommerce_demo.rs:74
Functionget_user_success
(id: u32)
src/lib.rs:65
Functionget_weather_data
(city: &str)
examples/ecommerce_demo.rs:65
Functionload_service_config
(service_name: &str)
examples/devops_monitoring.rs:53
Functionmain
()
examples/ecommerce_demo.rs:81
Functionmain
()
examples/devops_monitoring.rs:92
Functionmain
()
examples/readme_example.rs:22
Methodnew
Create a new Groq client with the given API key
src/groq_client.rs:45
Functionprocess_payment
(amount: f64, user_id: u32)
examples/ecommerce_demo.rs:52
Functiontest_ai_with_complex_context
()
src/lib.rs:215
Functiontest_source_code_generation_for_test_functions
()
src/lib.rs:267
Functiontest_trait_implementation_structure
()
src/lib.rs:238
Functiontest_type_constraints
()
src/lib.rs:279
Functiontest_unwrap_or_ai_with_real_api_call_failed_result
()
src/lib.rs:165
Functiontest_unwrap_or_ai_with_real_api_call_none_option
()
src/lib.rs:188
Functiontest_unwrap_or_ai_with_successful_option
()
src/lib.rs:155
Functiontest_unwrap_or_ai_with_successful_result
()
src/lib.rs:145
Functionunwrap_or_ai_func
(_attr: TokenStream, item: TokenStream)
unwrap_or_ai_proc_macro/src/lib.rs:6