Skip to content

Commit f99f847

Browse files
committed
feat: add functions to my_provider.py
1 parent e1f20a6 commit f99f847

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

my_provider.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
1-
import json
2-
from typing import Dict, Any, Union, Optional, List
1+
import requests
2+
from typing import Dict, Any
33

4-
def call_api(prompt: str, options: Dict[str, Any], context: Dict[str, Any]) -> Dict[str, Any]:
4+
API_ENDPOINT = "http://localhost:8080"
5+
6+
def get_auth_token() -> str:
7+
"""
8+
Gets an auth token from the API.
9+
10+
Returns:
11+
str: The auth token.
12+
"""
13+
raise NotImplementedError
14+
15+
def create_session() -> str:
16+
"""
17+
Creates a session with the API.
18+
19+
Returns:
20+
str: The session ID.
21+
"""
22+
raise NotImplementedError
23+
24+
def call_api(prompt: str, options: Dict[str, Any], context: Dict[str, Any]) -> Dict[str, Any]:
25+
"""
26+
Calls the API with the given prompt, options, and context.
27+
"""
28+
raise NotImplementedError

0 commit comments

Comments
 (0)