Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration problem #975

Closed
jjhesk opened this issue May 22, 2024 · 2 comments
Closed

integration problem #975

jjhesk opened this issue May 22, 2024 · 2 comments

Comments

@jjhesk
Copy link

jjhesk commented May 22, 2024

I have a new client that i want to build.

Now I am trying to use OpenAI as the base class and implement some overrides clients

I have the request like this..

method POST


json  {
            "messages": messages,
            "id": random_id,
            "userId": random_user_id,
            "codeModelMode": True,
            "agentMode": {},
            "trendingAgentMode": {},
            "isMicMode": False,
            "isChromeExt": False,
            "playgroundMode": False,
            "webSearchMode": False,
            "userSystemPrompt": "",
            "githubToken": None
        }

header

  _headers = {
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
            "Accept": "*/*",
            "Accept-Language": "en-US,en;q=0.5",
            "Accept-Encoding": "gzip, deflate, br",
            "Referer": cls.url,
            "Content-Type": "application/json",
            "Origin": cls.url,
            "DNT": "1",
            "Sec-GPC": "1",
            "Alt-Used": "www.bbia.ai",
            "Connection": "keep-alive",
        }

I would like to know if there are something that I can override or I have to build a new request class. if there are things i can pick i integrate with OpenAI module that would be great.

@jjhesk
Copy link
Author

jjhesk commented May 22, 2024

This is the lower level integration. We can use this api endpoint of our private node given with the model name that will work just fine.

@jacobweiss2305
Copy link
Contributor

Please see phidata\phi\model\openai\like.py you can wrap custom url and requests around the OpenAI API Client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants