Spaces:
Running
Running
Download services/llm.py from s-ttp/slipstream: direct link, hf CLI and curl.
- Browser
- Download file 563 Bytes
-
https://huggingface.co/spaces/s-ttp/slipstream/resolve/main/services/llm.py
- Command line
-
hf download hf://spaces/s-ttp/slipstream/services/llm.py
-
curl -L -o llm.py https://huggingface.co/spaces/s-ttp/slipstream/resolve/main/services/llm.py
563 Bytes
| """Gemini call used by the fund's AI event-risk overlay (risk_screen.py). | |
| The picks-panel screeners (Anthropic/OpenAI fallbacks, validate_picks) moved to the Signalflow | |
| Space with the "Top AI Picks of the Month" panels.""" | |
| import config | |
| def _call_gemini(prompt: str) -> str: | |
| from google import genai | |
| client = genai.Client(api_key=config.GEMINI_API_KEY) | |
| resp = client.models.generate_content( | |
| model=config.GEMINI_MODEL, | |
| contents=prompt, | |
| config={"temperature": 0, "max_output_tokens": 4000}, | |
| ) | |
| return resp.text or "" | |