Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 22 for get_model (0.07 seconds)

  1. docs_src/path_params/tutorial005_py310.py

    from fastapi import FastAPI
    
    
    class ModelName(str, Enum):
        alexnet = "alexnet"
        resnet = "resnet"
        lenet = "lenet"
    
    
    app = FastAPI()
    
    
    @app.get("/models/{model_name}")
    async def get_model(model_name: ModelName):
        if model_name is ModelName.alexnet:
            return {"model_name": model_name, "message": "Deep Learning FTW!"}
    
        if model_name.value == "lenet":
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 546 bytes
    - Click Count (0)
  2. tests/test_datetime_custom_encoder.py

        app = FastAPI()
        model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8))
    
        @app.get("/model", response_model=ModelWithDatetimeField)
        def get_model():
            return model
    
        client = TestClient(app)
        with client:
            response = client.get("/model")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 817 bytes
    - Click Count (0)
  3. src/test/java/org/codelibs/fess/llm/LlmChatResponseTest.java

        @Test
        public void test_setModel() {
            final LlmChatResponse response = new LlmChatResponse();
    
            response.setModel("llama3");
            assertEquals("llama3", response.getModel());
    
            response.setModel("gpt-3.5-turbo");
            assertEquals("gpt-3.5-turbo", response.getModel());
        }
    
        @Test
        public void test_nullValues() {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Jan 14 14:29:07 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  4. tests/test_filter_pydantic_sub_model_pv2.py

                    raise ValueError("name must end in A")
                return name
    
        async def get_model_c() -> ModelC:
            return ModelC(username="test-user", password="test-password")
    
        @app.get("/model/{name}", response_model=ModelA)
        async def get_model_a(name: str, model_c=Depends(get_model_c)):
            return {
                "name": name,
                "description": "model-a-desc",
                "foo": model_c,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  5. src/test/java/org/codelibs/fess/llm/LlmChatRequestTest.java

        }
    
        @Test
        public void test_setModel() {
            final LlmChatRequest request = new LlmChatRequest();
    
            final LlmChatRequest result = request.setModel("gpt-4");
    
            assertSame(request, result);
            assertEquals("gpt-4", request.getModel());
        }
    
        @Test
        public void test_setMaxTokens() {
            final LlmChatRequest request = new LlmChatRequest();
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Jan 14 14:29:07 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  6. src/main/java/org/codelibs/fess/llm/LlmChatResponse.java

        }
    
        /**
         * Gets the model name.
         *
         * @return the model name
         */
        public String getModel() {
            return model;
        }
    
        /**
         * Sets the model name.
         *
         * @param model the model name
         */
        public void setModel(final String model) {
            this.model = model;
        }
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Mon Jan 12 10:32:40 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  7. src/main/java/org/codelibs/fess/llm/LlmChatRequest.java

         * Gets the model name.
         *
         * @return the model name
         */
        public String getModel() {
            return model;
        }
    
        /**
         * Sets the model name.
         *
         * @param model the model name
         * @return this request for method chaining
         */
        public LlmChatRequest setModel(final String model) {
            this.model = model;
            return this;
        }
    
        /**
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 05 03:38:31 GMT 2026
    - 6.4K bytes
    - Click Count (0)
  8. compat/maven-model-builder/src/test/java/org/apache/maven/model/inheritance/DefaultInheritanceAssemblerTest.java

            testInheritance(baseName, true);
        }
    
        public void testInheritance(String baseName, boolean fromRepo) throws IOException {
            Model parent = getModel(baseName + "-parent");
    
            Model child = getModel(baseName + "-child");
    
            if (fromRepo) {
                // when model is read from repo, a stream is used, then pomFile == null
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Wed Sep 17 10:01:14 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  9. src/test/java/org/codelibs/fess/score/LtrQueryRescorerTest.java

            assertNull(result);
        }
    
        @Test
        public void test_evaluate_withValidModelName() {
            // Test with valid model name
            final String testModelName = "test_model";
            final int testWindowSize = 100;
    
            ComponentUtil.setFessConfig(new FessConfig.SimpleImpl() {
                @Override
                public String getLtrModelName() {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 11.7K bytes
    - Click Count (0)
  10. compat/maven-compat/src/main/java/org/apache/maven/toolchain/ToolchainManagerFactory.java

            public String findTool(String toolName) {
                return delegate.findTool(toolName);
            }
    
            @Override
            public org.apache.maven.api.toolchain.ToolchainModel getModel() {
                return delegate.getModel().getDelegate();
            }
    
            @Override
            public boolean matchesRequirements(Map<String, String> requirements) {
                return delegate.matchesRequirements(requirements);
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Oct 31 10:58:52 GMT 2025
    - 11K bytes
    - Click Count (0)
Back to Top