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

Where does this model call the OpenAI API? #1119

Closed
ShenLongDX opened this issue Jun 7, 2024 · 1 comment
Closed

Where does this model call the OpenAI API? #1119

ShenLongDX opened this issue Jun 7, 2024 · 1 comment

Comments

@ShenLongDX
Copy link

"Where does this model call the OpenAI API? I want to call my own API interface, but I can't find the configuration file. Where should I configure it?

@tom-doerr
Copy link
Contributor

This is the code that connects to OpenAI: https://github.com/stanfordnlp/dspy/blob/main/dsp/modules/gpt3.py
Setting api_base might be enough when initializing the LM.

    def __init__(
        self,
        model: str = "gpt-3.5-turbo-instruct",
        api_key: Optional[str] = None,
        api_provider: Literal["openai"] = "openai",
        api_base: Optional[str] = None,
        model_type: Literal["chat", "text"] = None,
        system_prompt: Optional[str] = None,
        **kwargs,
    ):

Related issue: #1075

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

3 participants